Skip to content

Commit 95cf95f

Browse files
authored
Merge pull request #14 from IBM/sdk-update-20230327-122030
Sdk update 20230327 122030
2 parents 074b08c + b2e11ce commit 95cf95f

File tree

58 files changed

+3756
-1772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3756
-1772
lines changed

.cra/.cveignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: java
33
dist: bionic
44

55
jdk:
6-
- openjdk8
6+
- openjdk11
77

88
notifications:
99
email: true
@@ -36,7 +36,7 @@ jobs:
3636
include:
3737
# Build and test stage
3838
- stage: Build-Test
39-
jdk: openjdk8
39+
jdk: openjdk11
4040
install: true
4141
script:
4242
- build/setMavenVersion.sh
@@ -52,7 +52,7 @@ jobs:
5252

5353
# Publish stage
5454
- stage: Publish-Release
55-
jdk: openjdk8
55+
jdk: openjdk11
5656
name: Publish-Javadoc
5757
install: true
5858
if: tag IS present
@@ -62,7 +62,7 @@ jobs:
6262
- build/publishJavadoc.sh
6363
after_success:
6464
- echo "Javadocs successfully published to gh-pages!"
65-
# - jdk: openjdk8
65+
# - jdk: openjdk11
6666
# if: tag IS present
6767
# name: Publish-To-Maven-Central
6868
# install: true

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://travis-ci.com/IBM/code-engine-java-sdk.svg?branch=main)](https://travis-ci.com/IBM/code-engine-java-sdk)
22
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
33

4-
# IBM Cloud Code Engine Java SDK Version 2.0.5
4+
# IBM Cloud Code Engine Java SDK Version 3.1.0
55

66
Java client library to interact with the [Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
77

@@ -39,7 +39,7 @@ The IBM Cloud Code Engine Java SDK allows developers to programmatically interac
3939

4040
Service Name | Artifact Coordinates
4141
--- | ---
42-
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | com.ibm.cloud.code-engine:2.0.5
42+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | com.ibm.cloud.code-engine:3.1.0
4343

4444
## Prerequisites
4545

@@ -51,7 +51,7 @@ Service Name | Artifact Coordinates
5151

5252
## Installation
5353

54-
The current version of this SDK is: 2.0.5
54+
The current version of this SDK is: 3.1.0
5555

5656
Each service's artifact coordinates are listed in the table above.
5757

@@ -70,14 +70,14 @@ Here are examples for maven and gradle:
7070
<dependency>
7171
<groupId>com.ibm.cloud</groupId>
7272
<artifactId>code-engine</artifactId>
73-
<version>2.0.5</version>
73+
<version>3.1.0</version>
7474
</dependency>
7575
```
7676

7777
### Gradle
7878

7979
```gradle
80-
compile 'com.ibm.cloud:code-engine:2.0.5'
80+
compile 'com.ibm.cloud:code-engine:3.1.0'
8181
```
8282

8383
## Using the SDK

modules/code-engine/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
<artifactId>mockwebserver</artifactId>
4141
<scope>test</scope>
4242
</dependency>
43+
<dependency>
44+
<groupId>org.slf4j</groupId>
45+
<artifactId>slf4j-jdk14</artifactId>
46+
<scope>test</scope>
47+
</dependency>
4348
</dependencies>
4449

4550
<developers>

modules/code-engine/src/main/java/com/ibm/cloud/code_engine/code_engine/v2/CodeEngine.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.64.0-959a5845-20230112-195144
15+
* IBM OpenAPI SDK Code Generator Version: 3.66.0-d6c2d7e0-20230215-221247
1616
*/
1717

1818
package com.ibm.cloud.code_engine.code_engine.v2;
@@ -52,6 +52,7 @@
5252
import com.ibm.cloud.code_engine.code_engine.v2.model.GetConfigMapOptions;
5353
import com.ibm.cloud.code_engine.code_engine.v2.model.GetJobOptions;
5454
import com.ibm.cloud.code_engine.code_engine.v2.model.GetJobRunOptions;
55+
import com.ibm.cloud.code_engine.code_engine.v2.model.GetProjectEgressIpsOptions;
5556
import com.ibm.cloud.code_engine.code_engine.v2.model.GetProjectOptions;
5657
import com.ibm.cloud.code_engine.code_engine.v2.model.GetSecretOptions;
5758
import com.ibm.cloud.code_engine.code_engine.v2.model.Job;
@@ -68,6 +69,7 @@
6869
import com.ibm.cloud.code_engine.code_engine.v2.model.ListProjectsOptions;
6970
import com.ibm.cloud.code_engine.code_engine.v2.model.ListSecretsOptions;
7071
import com.ibm.cloud.code_engine.code_engine.v2.model.Project;
72+
import com.ibm.cloud.code_engine.code_engine.v2.model.ProjectEgressIPAddresses;
7173
import com.ibm.cloud.code_engine.code_engine.v2.model.ProjectList;
7274
import com.ibm.cloud.code_engine.code_engine.v2.model.ReplaceConfigMapOptions;
7375
import com.ibm.cloud.code_engine.code_engine.v2.model.ReplaceSecretOptions;
@@ -259,6 +261,30 @@ public ServiceCall<Void> deleteProject(DeleteProjectOptions deleteProjectOptions
259261
return createServiceCall(builder.build(), responseConverter);
260262
}
261263

264+
/**
265+
* List egress IP addresses.
266+
*
267+
* Lists all egress IP addresses (public and private) that are used by components running in this project.
268+
*
269+
* @param getProjectEgressIpsOptions the {@link GetProjectEgressIpsOptions} containing the options for the call
270+
* @return a {@link ServiceCall} with a result of type {@link ProjectEgressIPAddresses}
271+
*/
272+
public ServiceCall<ProjectEgressIPAddresses> getProjectEgressIps(GetProjectEgressIpsOptions getProjectEgressIpsOptions) {
273+
com.ibm.cloud.sdk.core.util.Validator.notNull(getProjectEgressIpsOptions,
274+
"getProjectEgressIpsOptions cannot be null");
275+
Map<String, String> pathParamsMap = new HashMap<String, String>();
276+
pathParamsMap.put("project_id", getProjectEgressIpsOptions.projectId());
277+
RequestBuilder builder = RequestBuilder.get(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/projects/{project_id}/egress_ips", pathParamsMap));
278+
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("code_engine", "v2", "getProjectEgressIps");
279+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
280+
builder.header(header.getKey(), header.getValue());
281+
}
282+
builder.header("Accept", "application/json");
283+
ResponseConverter<ProjectEgressIPAddresses> responseConverter =
284+
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ProjectEgressIPAddresses>() { }.getType());
285+
return createServiceCall(builder.build(), responseConverter);
286+
}
287+
262288
/**
263289
* List applications.
264290
*

modules/code-engine/src/main/java/com/ibm/cloud/code_engine/code_engine/v2/model/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public String getEndpointInternal() {
170170
/**
171171
* Gets the entityTag.
172172
*
173-
* The version of the job instance, which is used to achieve optimistic locking.
173+
* The version of the app instance, which is used to achieve optimistic locking.
174174
*
175175
* @return the entityTag
176176
*/

modules/code-engine/src/main/java/com/ibm/cloud/code_engine/code_engine/v2/model/CreateJobOptions.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class CreateJobOptions extends GenericModel {
2424

2525
/**
2626
* The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `max_execution_time` and
27-
* `retry_limit` options apply. In `daemon` mode, since there is no timeout and failed instances are restarted
28-
* indefinitely, the `max_execution_time` and `retry_limit` options are not allowed.
27+
* `retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted
28+
* indefinitely, the `max_execution_time` and `retry_limit` properties are not allowed.
2929
*/
3030
public interface RunMode {
3131
/** task. */
@@ -36,7 +36,7 @@ public interface RunMode {
3636

3737
/**
3838
* The name of the service account. For built-in service accounts, you can use the shortened names `manager`, `none`,
39-
* `reader`, and `writer`.
39+
* `reader`, and `writer`. This property must not be set on a job run, which references a job template.
4040
*/
4141
public interface RunServiceAccount {
4242
/** default. */
@@ -479,7 +479,7 @@ public String name() {
479479
* The name of the image registry access secret. The image registry access secret is used to authenticate with a
480480
* private registry when you download the container image. If the image reference points to a registry that requires
481481
* authentication, the job / job runs will be created but submitted job runs will fail, until this property is
482-
* provided, too.
482+
* provided, too. This property must not be set on a job run, which references a job template.
483483
*
484484
* @return the imageSecret
485485
*/
@@ -537,8 +537,8 @@ public List<EnvVarPrototype> runEnvVariables() {
537537
* Gets the runMode.
538538
*
539539
* The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `max_execution_time` and
540-
* `retry_limit` options apply. In `daemon` mode, since there is no timeout and failed instances are restarted
541-
* indefinitely, the `max_execution_time` and `retry_limit` options are not allowed.
540+
* `retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted
541+
* indefinitely, the `max_execution_time` and `retry_limit` properties are not allowed.
542542
*
543543
* @return the runMode
544544
*/
@@ -550,7 +550,7 @@ public String runMode() {
550550
* Gets the runServiceAccount.
551551
*
552552
* The name of the service account. For built-in service accounts, you can use the shortened names `manager`, `none`,
553-
* `reader`, and `writer`.
553+
* `reader`, and `writer`. This property must not be set on a job run, which references a job template.
554554
*
555555
* @return the runServiceAccount
556556
*/
@@ -611,7 +611,8 @@ public String scaleEphemeralStorageLimit() {
611611
/**
612612
* Gets the scaleMaxExecutionTime.
613613
*
614-
* The maximum execution time in seconds for runs of the job. This option can only be specified if `mode` is `task`.
614+
* The maximum execution time in seconds for runs of the job. This property can only be specified if `run_mode` is
615+
* `task`.
615616
*
616617
* @return the scaleMaxExecutionTime
617618
*/
@@ -637,8 +638,8 @@ public String scaleMemoryLimit() {
637638
/**
638639
* Gets the scaleRetryLimit.
639640
*
640-
* The number of times to rerun an instance of the job before the job is marked as failed. This option can only be
641-
* specified if `mode` is `task`.
641+
* The number of times to rerun an instance of the job before the job is marked as failed. This property can only be
642+
* specified if `run_mode` is `task`.
642643
*
643644
* @return the scaleRetryLimit
644645
*/

modules/code-engine/src/main/java/com/ibm/cloud/code_engine/code_engine/v2/model/CreateJobRunOptions.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public class CreateJobRunOptions extends GenericModel {
2424

2525
/**
2626
* The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `max_execution_time` and
27-
* `retry_limit` options apply. In `daemon` mode, since there is no timeout and failed instances are restarted
28-
* indefinitely, the `max_execution_time` and `retry_limit` options are not allowed.
27+
* `retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted
28+
* indefinitely, the `max_execution_time` and `retry_limit` properties are not allowed.
2929
*/
3030
public interface RunMode {
3131
/** task. */
@@ -36,7 +36,7 @@ public interface RunMode {
3636

3737
/**
3838
* The name of the service account. For built-in service accounts, you can use the shortened names `manager`, `none`,
39-
* `reader`, and `writer`.
39+
* `reader`, and `writer`. This property must not be set on a job run, which references a job template.
4040
*/
4141
public interface RunServiceAccount {
4242
/** default. */
@@ -475,7 +475,7 @@ public String imageReference() {
475475
* The name of the image registry access secret. The image registry access secret is used to authenticate with a
476476
* private registry when you download the container image. If the image reference points to a registry that requires
477477
* authentication, the job / job runs will be created but submitted job runs will fail, until this property is
478-
* provided, too.
478+
* provided, too. This property must not be set on a job run, which references a job template.
479479
*
480480
* @return the imageSecret
481481
*/
@@ -556,8 +556,8 @@ public List<EnvVarPrototype> runEnvVariables() {
556556
* Gets the runMode.
557557
*
558558
* The mode for runs of the job. Valid values are `task` and `daemon`. In `task` mode, the `max_execution_time` and
559-
* `retry_limit` options apply. In `daemon` mode, since there is no timeout and failed instances are restarted
560-
* indefinitely, the `max_execution_time` and `retry_limit` options are not allowed.
559+
* `retry_limit` properties apply. In `daemon` mode, since there is no timeout and failed instances are restarted
560+
* indefinitely, the `max_execution_time` and `retry_limit` properties are not allowed.
561561
*
562562
* @return the runMode
563563
*/
@@ -569,7 +569,7 @@ public String runMode() {
569569
* Gets the runServiceAccount.
570570
*
571571
* The name of the service account. For built-in service accounts, you can use the shortened names `manager`, `none`,
572-
* `reader`, and `writer`.
572+
* `reader`, and `writer`. This property must not be set on a job run, which references a job template.
573573
*
574574
* @return the runServiceAccount
575575
*/
@@ -630,7 +630,8 @@ public String scaleEphemeralStorageLimit() {
630630
/**
631631
* Gets the scaleMaxExecutionTime.
632632
*
633-
* The maximum execution time in seconds for runs of the job. This option can only be specified if `mode` is `task`.
633+
* The maximum execution time in seconds for runs of the job. This property can only be specified if `run_mode` is
634+
* `task`.
634635
*
635636
* @return the scaleMaxExecutionTime
636637
*/
@@ -656,8 +657,8 @@ public String scaleMemoryLimit() {
656657
/**
657658
* Gets the scaleRetryLimit.
658659
*
659-
* The number of times to rerun an instance of the job before the job is marked as failed. This option can only be
660-
* specified if `mode` is `task`.
660+
* The number of times to rerun an instance of the job before the job is marked as failed. This property can only be
661+
* specified if `run_mode` is `task`.
661662
*
662663
* @return the scaleRetryLimit
663664
*/

modules/code-engine/src/main/java/com/ibm/cloud/code_engine/code_engine/v2/model/CreateSecretOptions.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
*/
1313
package com.ibm.cloud.code_engine.code_engine.v2.model;
1414

15-
import java.util.Map;
16-
1715
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1816

1917
/**
@@ -44,7 +42,7 @@ public interface Format {
4442
protected String projectId;
4543
protected String format;
4644
protected String name;
47-
protected Map<String, String> data;
45+
protected SecretData data;
4846

4947
/**
5048
* Builder.
@@ -53,7 +51,7 @@ public static class Builder {
5351
private String projectId;
5452
private String format;
5553
private String name;
56-
private Map<String, String> data;
54+
private SecretData data;
5755

5856
/**
5957
* Instantiates a new Builder from an existing CreateSecretOptions instance.
@@ -134,7 +132,7 @@ public Builder name(String name) {
134132
* @param data the data
135133
* @return the CreateSecretOptions builder
136134
*/
137-
public Builder data(Map<String, String> data) {
135+
public Builder data(SecretData data) {
138136
this.data = data;
139137
return this;
140138
}
@@ -206,7 +204,7 @@ public String name() {
206204
*
207205
* @return the data
208206
*/
209-
public Map<String, String> data() {
207+
public SecretData data() {
210208
return data;
211209
}
212210
}

0 commit comments

Comments
 (0)