Skip to content

Commit d3dc0bd

Browse files
feat(api): Updated java-sdk to adopt Code Engine API specification changes
1 parent 74c7105 commit d3dc0bd

File tree

12 files changed

+243
-139
lines changed

12 files changed

+243
-139
lines changed

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 4.8.0
4+
# IBM Cloud Code Engine Java SDK Version 4.10.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:4.8.0
42+
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | com.ibm.cloud.code-engine:4.10.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: 4.8.0
54+
The current version of this SDK is: 4.10.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>4.8.0</version>
73+
<version>4.10.0</version>
7474
</dependency>
7575
```
7676

7777
### Gradle
7878

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

8383
## Using the SDK

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

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

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.92.1-44330004-20240620-143510
15+
* IBM OpenAPI SDK Code Generator Version: 3.94.1-71478489-20240820-161623
1616
*/
1717

1818
package com.ibm.cloud.code_engine.code_engine.v2;
@@ -175,7 +175,7 @@ public CodeEngine(String serviceName, Authenticator authenticator) {
175175
* Gets the version.
176176
*
177177
* The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between
178-
* `2021-03-31` and `2024-08-30`.
178+
* `2021-03-31` and `2024-09-27`.
179179
*
180180
* @return the version
181181
*/
@@ -567,7 +567,7 @@ public ServiceCall<App> updateApp(UpdateAppOptions updateAppOptions) {
567567
if (this.version != null) {
568568
builder.query("version", String.valueOf(this.version));
569569
}
570-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateAppOptions.app()), "application/merge-patch+json");
570+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateAppOptions.app()), "application/merge-patch+json");
571571
ResponseConverter<App> responseConverter =
572572
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<App>() { }.getType());
573573
return createServiceCall(builder.build(), responseConverter);
@@ -875,7 +875,7 @@ public ServiceCall<Job> updateJob(UpdateJobOptions updateJobOptions) {
875875
if (this.version != null) {
876876
builder.query("version", String.valueOf(this.version));
877877
}
878-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateJobOptions.job()), "application/merge-patch+json");
878+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateJobOptions.job()), "application/merge-patch+json");
879879
ResponseConverter<Job> responseConverter =
880880
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<Job>() { }.getType());
881881
return createServiceCall(builder.build(), responseConverter);
@@ -1255,7 +1255,7 @@ public ServiceCall<Function> updateFunction(UpdateFunctionOptions updateFunction
12551255
if (this.version != null) {
12561256
builder.query("version", String.valueOf(this.version));
12571257
}
1258-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateFunctionOptions.function()), "application/merge-patch+json");
1258+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateFunctionOptions.function()), "application/merge-patch+json");
12591259
ResponseConverter<Function> responseConverter =
12601260
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<Function>() { }.getType());
12611261
return createServiceCall(builder.build(), responseConverter);
@@ -1523,7 +1523,7 @@ public ServiceCall<Build> updateBuild(UpdateBuildOptions updateBuildOptions) {
15231523
}
15241524
builder.header("Accept", "application/json");
15251525
builder.header("If-Match", updateBuildOptions.ifMatch());
1526-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateBuildOptions.build()), "application/merge-patch+json");
1526+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateBuildOptions.build()), "application/merge-patch+json");
15271527
ResponseConverter<Build> responseConverter =
15281528
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<Build>() { }.getType());
15291529
return createServiceCall(builder.build(), responseConverter);
@@ -1806,7 +1806,7 @@ public ServiceCall<DomainMapping> updateDomainMapping(UpdateDomainMappingOptions
18061806
}
18071807
builder.header("Accept", "application/json");
18081808
builder.header("If-Match", updateDomainMappingOptions.ifMatch());
1809-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateDomainMappingOptions.domainMapping()), "application/merge-patch+json");
1809+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateDomainMappingOptions.domainMapping()), "application/merge-patch+json");
18101810
ResponseConverter<DomainMapping> responseConverter =
18111811
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<DomainMapping>() { }.getType());
18121812
return createServiceCall(builder.build(), responseConverter);

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,17 @@ public interface Reason {
6363

6464
@SerializedName("completion_time")
6565
protected String completionTime;
66+
@SerializedName("git_branch_name")
67+
protected String gitBranchName;
68+
@SerializedName("git_commit_author")
69+
protected String gitCommitAuthor;
70+
@SerializedName("git_commit_sha")
71+
protected String gitCommitSha;
6672
@SerializedName("output_digest")
6773
protected String outputDigest;
6874
protected String reason;
75+
@SerializedName("source_timestamp")
76+
protected String sourceTimestamp;
6977
@SerializedName("start_time")
7078
protected String startTime;
7179

@@ -82,6 +90,39 @@ public String getCompletionTime() {
8290
return completionTime;
8391
}
8492

93+
/**
94+
* Gets the gitBranchName.
95+
*
96+
* The default branch name of the git source.
97+
*
98+
* @return the gitBranchName
99+
*/
100+
public String getGitBranchName() {
101+
return gitBranchName;
102+
}
103+
104+
/**
105+
* Gets the gitCommitAuthor.
106+
*
107+
* The commit author of a git source.
108+
*
109+
* @return the gitCommitAuthor
110+
*/
111+
public String getGitCommitAuthor() {
112+
return gitCommitAuthor;
113+
}
114+
115+
/**
116+
* Gets the gitCommitSha.
117+
*
118+
* The commit sha of the git source.
119+
*
120+
* @return the gitCommitSha
121+
*/
122+
public String getGitCommitSha() {
123+
return gitCommitSha;
124+
}
125+
85126
/**
86127
* Gets the outputDigest.
87128
*
@@ -104,6 +145,17 @@ public String getReason() {
104145
return reason;
105146
}
106147

148+
/**
149+
* Gets the sourceTimestamp.
150+
*
151+
* The timestamp of the source.
152+
*
153+
* @return the sourceTimestamp
154+
*/
155+
public String getSourceTimestamp() {
156+
return sourceTimestamp;
157+
}
158+
107159
/**
108160
* Gets the startTime.
109161
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* consist of alphanumeric characters, `-`, `_` or `.` and must not exceed a max length of 253 characters. Each value
2323
* field can consists of any character and must not exceed a max length of 1048576 characters.
2424
*
25+
* This type supports additional properties of type String.
26+
*
2527
* Classes which extend this class:
2628
* - SecretDataGenericSecretData
2729
* - SecretDataBasicAuthSecretData

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* SecretDataBasicAuthSecretData.
21+
*
22+
* This type supports additional properties of type String.
2123
*/
2224
public class SecretDataBasicAuthSecretData extends SecretData {
2325

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* Data container that allows to specify config parameters and their values as a key-value map. Each key field must
2121
* consist of alphanumeric characters, `-`, `_` or `.` and must not be exceed a max length of 253 characters. Each value
2222
* field can consists of any character and must not be exceed a max length of 1048576 characters.
23+
*
24+
* This type supports additional properties of type String.
2325
*/
2426
public class SecretDataGenericSecretData extends SecretData {
2527

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* SecretDataRegistrySecretData.
21+
*
22+
* This type supports additional properties of type String.
2123
*/
2224
public class SecretDataRegistrySecretData extends SecretData {
2325

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* Secret Data field used by SSH secrets.
21+
*
22+
* This type supports additional properties of type String.
2123
*/
2224
public class SecretDataSSHSecretData extends SecretData {
2325

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/**
2020
* SecretDataTLSSecretData.
21+
*
22+
* This type supports additional properties of type String.
2123
*/
2224
public class SecretDataTLSSecretData extends SecretData {
2325

0 commit comments

Comments
 (0)