Skip to content

Commit 064203b

Browse files
feat(api): Updated java-sdk to adopt Code Engine API specification changes
1 parent d82da48 commit 064203b

36 files changed

Lines changed: 1811 additions & 1931 deletions

README.md

Lines changed: 12 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 5.0.0
4+
# IBM Cloud Code Engine Java SDK Version 6.0.0
55

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

@@ -25,6 +25,7 @@ Java client library to interact with the [Code Engine API](https://cloud.ibm.com
2525
* [Maven](#maven)
2626
* [Gradle](#gradle)
2727
- [Using the SDK](#using-the-sdk)
28+
- [Breaking Changes (April 2026)](#breaking-changes-april-2026)
2829
- [Breaking Changes (March 2026)](#breaking-changes-march-2026)
2930
- [Questions](#questions)
3031
- [Issues](#issues)
@@ -40,7 +41,7 @@ The IBM Cloud Code Engine Java SDK allows developers to programmatically interac
4041

4142
Service Name | Artifact Coordinates
4243
--- | ---
43-
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | com.ibm.cloud.code-engine:5.0.0
44+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | com.ibm.cloud.code-engine:6.0.0
4445

4546
## Prerequisites
4647

@@ -52,7 +53,7 @@ Service Name | Artifact Coordinates
5253

5354
## Installation
5455

55-
The current version of this SDK is: 5.0.0
56+
The current version of this SDK is: 6.0.0
5657

5758
Each service's artifact coordinates are listed in the table above.
5859

@@ -71,14 +72,14 @@ Here are examples for maven and gradle:
7172
<dependency>
7273
<groupId>com.ibm.cloud</groupId>
7374
<artifactId>code-engine</artifactId>
74-
<version>5.0.0</version>
75+
<version>6.0.0</version>
7576
</dependency>
7677
```
7778

7879
### Gradle
7980

8081
```gradle
81-
compile 'com.ibm.cloud:code-engine:5.0.0'
82+
compile 'com.ibm.cloud:code-engine:6.0.0'
8283
```
8384

8485
## Using the SDK
@@ -87,6 +88,12 @@ Examples and a demo are available in the [module examples](/modules/examples) fo
8788

8889
For general SDK usage information, please see [this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md)
8990

91+
## Breaking Changes (April 2026)
92+
93+
As part of the introduction of `persistent_data_stores` as a Volume Mount type for **apps** and **jobs**, the optional `name` property of entries in `run_volume_mounts` is no longer supported.
94+
95+
If you used the optional `name` property, remove it from the prototype of the **app** or **job**.
96+
9097
## Breaking Changes (March 2026)
9198

9299
- **Method renames (pluralization) in `CodeEngine` service**

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

Lines changed: 501 additions & 501 deletions
Large diffs are not rendered by default.

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

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,18 @@ public interface IsolationPolicy {
6464
@SerializedName("entity_tag")
6565
protected String entityTag;
6666
protected String name;
67+
@SerializedName("project_id")
68+
protected String projectId;
6769
protected String status;
6870
@SerializedName("status_details")
6971
protected AllowedOutboundStatusDetails statusDetails;
7072
protected String type;
7173
@SerializedName("cidr_block")
7274
protected String cidrBlock;
73-
@SerializedName("private_path_service_gateway_crn")
74-
protected String privatePathServiceGatewayCrn;
7575
@SerializedName("isolation_policy")
7676
protected String isolationPolicy;
77+
@SerializedName("private_path_service_gateway_crn")
78+
protected String privatePathServiceGatewayCrn;
7779

7880
protected AllowedOutboundDestination() { }
7981

@@ -99,6 +101,17 @@ public String getName() {
99101
return name;
100102
}
101103

104+
/**
105+
* Gets the projectId.
106+
*
107+
* The ID of the project in which the resource is located.
108+
*
109+
* @return the projectId
110+
*/
111+
public String getProjectId() {
112+
return projectId;
113+
}
114+
102115
/**
103116
* Gets the status.
104117
*
@@ -142,17 +155,6 @@ public String getCidrBlock() {
142155
return cidrBlock;
143156
}
144157

145-
/**
146-
* Gets the privatePathServiceGatewayCrn.
147-
*
148-
* The CRN of the Private Path service.
149-
*
150-
* @return the privatePathServiceGatewayCrn
151-
*/
152-
public String getPrivatePathServiceGatewayCrn() {
153-
return privatePathServiceGatewayCrn;
154-
}
155-
156158
/**
157159
* Gets the isolationPolicy.
158160
*
@@ -166,5 +168,16 @@ public String getPrivatePathServiceGatewayCrn() {
166168
public String getIsolationPolicy() {
167169
return isolationPolicy;
168170
}
171+
172+
/**
173+
* Gets the privatePathServiceGatewayCrn.
174+
*
175+
* The CRN of the Private Path service.
176+
*
177+
* @return the privatePathServiceGatewayCrn
178+
*/
179+
public String getPrivatePathServiceGatewayCrn() {
180+
return privatePathServiceGatewayCrn;
181+
}
169182
}
170183

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,17 @@ public interface IsolationPolicy {
4949
String DEDICATED = "dedicated";
5050
}
5151

52-
protected String type;
5352
protected String name;
53+
protected String type;
5454
@SerializedName("cidr_block")
5555
protected String cidrBlock;
56-
@SerializedName("private_path_service_gateway_crn")
57-
protected String privatePathServiceGatewayCrn;
5856
@SerializedName("isolation_policy")
5957
protected String isolationPolicy;
58+
@SerializedName("private_path_service_gateway_crn")
59+
protected String privatePathServiceGatewayCrn;
6060

6161
protected AllowedOutboundDestinationPrototype() { }
6262

63-
/**
64-
* Gets the type.
65-
*
66-
* Specify the type of the allowed outbound destination. Allowed types are: `cidr_block` and
67-
* `private_path_service_gateway`.
68-
*
69-
* @return the type
70-
*/
71-
public String type() {
72-
return type;
73-
}
74-
7563
/**
7664
* Gets the name.
7765
*
@@ -84,26 +72,26 @@ public String name() {
8472
}
8573

8674
/**
87-
* Gets the cidrBlock.
75+
* Gets the type.
8876
*
89-
* The IPv4 address range.
77+
* Specify the type of the allowed outbound destination. Allowed types are: `cidr_block` and
78+
* `private_path_service_gateway`.
9079
*
91-
* @return the cidrBlock
80+
* @return the type
9281
*/
93-
public String cidrBlock() {
94-
return cidrBlock;
82+
public String type() {
83+
return type;
9584
}
9685

9786
/**
98-
* Gets the privatePathServiceGatewayCrn.
87+
* Gets the cidrBlock.
9988
*
100-
* The CRN of the Private Path service. The CRN can be obtained in the resource details of the target Private Path
101-
* service. [Learn more](https://cloud.ibm.com/docs/vpc?topic=vpc-pps-ui-communicate).
89+
* The IPv4 address range.
10290
*
103-
* @return the privatePathServiceGatewayCrn
91+
* @return the cidrBlock
10492
*/
105-
public String privatePathServiceGatewayCrn() {
106-
return privatePathServiceGatewayCrn;
93+
public String cidrBlock() {
94+
return cidrBlock;
10795
}
10896

10997
/**
@@ -119,5 +107,17 @@ public String privatePathServiceGatewayCrn() {
119107
public String isolationPolicy() {
120108
return isolationPolicy;
121109
}
110+
111+
/**
112+
* Gets the privatePathServiceGatewayCrn.
113+
*
114+
* The CRN of the Private Path service. The CRN can be obtained in the resource details of the target Private Path
115+
* service. [Learn more](https://cloud.ibm.com/docs/vpc?topic=vpc-pps-ui-communicate).
116+
*
117+
* @return the privatePathServiceGatewayCrn
118+
*/
119+
public String privatePathServiceGatewayCrn() {
120+
return privatePathServiceGatewayCrn;
121+
}
122122
}
123123

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public interface Type {
3434
* Builder.
3535
*/
3636
public static class Builder {
37-
private String type;
3837
private String name;
38+
private String type;
3939
private String cidrBlock;
4040

4141
/**
@@ -44,8 +44,8 @@ public static class Builder {
4444
* @param allowedOutboundDestinationPrototypeCidrBlockDataPrototype the instance to initialize the Builder with
4545
*/
4646
public Builder(AllowedOutboundDestinationPrototype allowedOutboundDestinationPrototypeCidrBlockDataPrototype) {
47-
this.type = allowedOutboundDestinationPrototypeCidrBlockDataPrototype.type;
4847
this.name = allowedOutboundDestinationPrototypeCidrBlockDataPrototype.name;
48+
this.type = allowedOutboundDestinationPrototypeCidrBlockDataPrototype.type;
4949
this.cidrBlock = allowedOutboundDestinationPrototypeCidrBlockDataPrototype.cidrBlock;
5050
}
5151

@@ -58,13 +58,13 @@ public Builder() {
5858
/**
5959
* Instantiates a new builder with required properties.
6060
*
61-
* @param type the type
6261
* @param name the name
62+
* @param type the type
6363
* @param cidrBlock the cidrBlock
6464
*/
65-
public Builder(String type, String name, String cidrBlock) {
66-
this.type = type;
65+
public Builder(String name, String type, String cidrBlock) {
6766
this.name = name;
67+
this.type = type;
6868
this.cidrBlock = cidrBlock;
6969
}
7070

@@ -78,24 +78,24 @@ public AllowedOutboundDestinationPrototypeCidrBlockDataPrototype build() {
7878
}
7979

8080
/**
81-
* Set the type.
81+
* Set the name.
8282
*
83-
* @param type the type
83+
* @param name the name
8484
* @return the AllowedOutboundDestinationPrototypeCidrBlockDataPrototype builder
8585
*/
86-
public Builder type(String type) {
87-
this.type = type;
86+
public Builder name(String name) {
87+
this.name = name;
8888
return this;
8989
}
9090

9191
/**
92-
* Set the name.
92+
* Set the type.
9393
*
94-
* @param name the name
94+
* @param type the type
9595
* @return the AllowedOutboundDestinationPrototypeCidrBlockDataPrototype builder
9696
*/
97-
public Builder name(String name) {
98-
this.name = name;
97+
public Builder type(String type) {
98+
this.type = type;
9999
return this;
100100
}
101101

@@ -114,14 +114,14 @@ public Builder cidrBlock(String cidrBlock) {
114114
protected AllowedOutboundDestinationPrototypeCidrBlockDataPrototype() { }
115115

116116
protected AllowedOutboundDestinationPrototypeCidrBlockDataPrototype(Builder builder) {
117-
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.type,
118-
"type cannot be null");
119117
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.name,
120118
"name cannot be null");
119+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.type,
120+
"type cannot be null");
121121
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.cidrBlock,
122122
"cidrBlock cannot be null");
123-
type = builder.type;
124123
name = builder.name;
124+
type = builder.type;
125125
cidrBlock = builder.cidrBlock;
126126
}
127127

0 commit comments

Comments
 (0)