Skip to content

Commit 16c8c0c

Browse files
omar-albastamiOmar Al Bastami
andauthored
feat(toolchain): add text plain object property for createToolchainEvents (#46)
* feat(toolchain): add eu-es region Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * docs: update false positives in secrets baseline Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * feat(toolchain): add function to create toolchain event Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: toolchain pom.xml Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * build: bump java core Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: bump dependencies Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * remove unused file Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * feat(toolchain): add function to create toolchain event Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: toolchain pom.xml Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: bump dependencies Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * remove unused file Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * Rebase attempt 2 Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * feat(toolchain): add function to create toolchain event Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: toolchain pom.xml Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix: bump dependencies Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * remove unused file Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * test: recover deleted test Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * feat(toolchain): add text plain object property for createToolchainEvent function BREAKING CHANGE: the textPlain string property is being replaced by a ToolchainEventPrototypeDataTextPlain object. String values must be provided using the ToolchainEventPrototypeDataTextPlain.content property Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> * fix to test Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> --------- Signed-off-by: Omar Al Bastami <omar.albastami@ibm.com> Co-authored-by: Omar Al Bastami <omar.albastami@ibm.com>
1 parent d3c70a4 commit 16c8c0c

82 files changed

Lines changed: 353 additions & 135 deletions

File tree

Some content is hidden

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

.secrets.baseline

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-08-29T18:26:38Z",
6+
"generated_at": "2024-10-15T19:07:42Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -82,7 +82,7 @@
8282
"hashed_secret": "8d204a8e6f883c0691207b5eed52ab2889568f71",
8383
"is_secret": false,
8484
"is_verified": false,
85-
"line_number": 245,
85+
"line_number": 233,
8686
"type": "Hex High Entropy String",
8787
"verified_result": null
8888
}
@@ -123,4 +123,4 @@
123123
"file": null,
124124
"hash": null
125125
}
126-
}
126+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The Java client library to interact with the [IBM Cloud Continuous Delivery Tool
2121

2222
<!-- toc -->
2323

24-
- [IBM Cloud Continuous Delivery Java SDK Version 1.9.0](#ibm-cloud-continuous-delivery-java-sdk-version-151)
24+
- [IBM Cloud Continuous Delivery Java SDK Version 1.9.0](#ibm-cloud-continuous-delivery-java-sdk-version-190)
2525
- [Table of Contents](#table-of-contents)
2626
- [Overview](#overview)
2727
- [Prerequisites](#prerequisites)

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/CdToolchain.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 3.77.0-42417df0-20230811-192318
15+
* IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902
1616
*/
1717

1818
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2;
@@ -51,16 +51,6 @@
5151
import java.util.Map;
5252
import java.util.Map.Entry;
5353

54-
/**
55-
* This swagger document describes the options and endpoints of the Toolchain API.&lt;br&gt;&lt;br&gt; All calls require
56-
* an &lt;strong&gt;Authorization&lt;/strong&gt; HTTP header to be set with a bearer token, which can be generated using
57-
* the &lt;a href="https://cloud.ibm.com/apidocs/iam-identity-token-api"&gt;Identity and Access Management (IAM)
58-
* API&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Note that all resources must have a corresponding
59-
* &lt;b&gt;resource_group_id&lt;/b&gt; to use the API, resources within a Cloud Foundry organization cannot be accessed
60-
* or modified using the API.
61-
*
62-
* API Version: 2.0.0
63-
*/
6454
public class CdToolchain extends BaseService {
6555

6656
/**
@@ -270,7 +260,7 @@ public ServiceCall<ToolchainPatch> updateToolchain(UpdateToolchainOptions update
270260
builder.header(header.getKey(), header.getValue());
271261
}
272262
builder.header("Accept", "application/json");
273-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateToolchainOptions.toolchainPrototypePatch()), "application/merge-patch+json");
263+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateToolchainOptions.toolchainPrototypePatch()), "application/merge-patch+json");
274264
ResponseConverter<ToolchainPatch> responseConverter =
275265
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ToolchainPatch>() { }.getType());
276266
return createServiceCall(builder.build(), responseConverter);
@@ -279,8 +269,8 @@ public ServiceCall<ToolchainPatch> updateToolchain(UpdateToolchainOptions update
279269
/**
280270
* Create a toolchain event.
281271
*
282-
* Creates and sends a custom event to Event Notifications. This requires an Event Notification tool. This method is
283-
* BETA and subject to change.
272+
* Creates and sends a custom event to each Event Notifications instance configured as a tool into the toolchain. This
273+
* operation will fail if no Event Notifications instances are configured into the toolchain.
284274
*
285275
* @param createToolchainEventOptions the {@link CreateToolchainEventOptions} containing the options for the call
286276
* @return a {@link ServiceCall} with a result of type {@link ToolchainEventPost}
@@ -441,7 +431,7 @@ public ServiceCall<ToolchainToolPatch> updateTool(UpdateToolOptions updateToolOp
441431
builder.header(header.getKey(), header.getValue());
442432
}
443433
builder.header("Accept", "application/json");
444-
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateToolOptions.toolchainToolPrototypePatch()), "application/merge-patch+json");
434+
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateToolOptions.toolchainToolPrototypePatch()), "application/merge-patch+json");
445435
ResponseConverter<ToolchainToolPatch> responseConverter =
446436
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ToolchainToolPatch>() { }.getType());
447437
return createServiceCall(builder.build(), responseConverter);

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/CreateToolOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import java.util.Map;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/CreateToolchainEventOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/CreateToolchainOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/DeleteToolOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/DeleteToolchainOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/GetToolByIdOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

modules/cd-toolchain/src/main/java/com/ibm/cloud/continuous_delivery/cd_toolchain/v2/model/GetToolchainByIdOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2023.
2+
* (C) Copyright IBM Corp. 2024.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -10,6 +10,7 @@
1010
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
1111
* specific language governing permissions and limitations under the License.
1212
*/
13+
1314
package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;
1415

1516
import com.ibm.cloud.sdk.core.service.model.GenericModel;

0 commit comments

Comments
 (0)