Skip to content

Commit

Permalink
feat(toolchain): add text plain object property for createToolchainEv…
Browse files Browse the repository at this point in the history
…ents (#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>
  • Loading branch information
omar-albastami and Omar Al Bastami authored Oct 16, 2024
1 parent d3c70a4 commit 16c8c0c
Show file tree
Hide file tree
Showing 82 changed files with 353 additions and 135 deletions.
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-08-29T18:26:38Z",
"generated_at": "2024-10-15T19:07:42Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -82,7 +82,7 @@
"hashed_secret": "8d204a8e6f883c0691207b5eed52ab2889568f71",
"is_secret": false,
"is_verified": false,
"line_number": 245,
"line_number": 233,
"type": "Hex High Entropy String",
"verified_result": null
}
Expand Down Expand Up @@ -123,4 +123,4 @@
"file": null,
"hash": null
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The Java client library to interact with the [IBM Cloud Continuous Delivery Tool

<!-- toc -->

- [IBM Cloud Continuous Delivery Java SDK Version 1.9.0](#ibm-cloud-continuous-delivery-java-sdk-version-151)
- [IBM Cloud Continuous Delivery Java SDK Version 1.9.0](#ibm-cloud-continuous-delivery-java-sdk-version-190)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Prerequisites](#prerequisites)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.77.0-42417df0-20230811-192318
* IBM OpenAPI SDK Code Generator Version: 3.96.0-d6dec9d7-20241008-212902
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2;
Expand Down Expand Up @@ -51,16 +51,6 @@
import java.util.Map;
import java.util.Map.Entry;

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

/**
Expand Down Expand Up @@ -270,7 +260,7 @@ public ServiceCall<ToolchainPatch> updateToolchain(UpdateToolchainOptions update
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateToolchainOptions.toolchainPrototypePatch()), "application/merge-patch+json");
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateToolchainOptions.toolchainPrototypePatch()), "application/merge-patch+json");
ResponseConverter<ToolchainPatch> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ToolchainPatch>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
Expand All @@ -279,8 +269,8 @@ public ServiceCall<ToolchainPatch> updateToolchain(UpdateToolchainOptions update
/**
* Create a toolchain event.
*
* Creates and sends a custom event to Event Notifications. This requires an Event Notification tool. This method is
* BETA and subject to change.
* Creates and sends a custom event to each Event Notifications instance configured as a tool into the toolchain. This
* operation will fail if no Event Notifications instances are configured into the toolchain.
*
* @param createToolchainEventOptions the {@link CreateToolchainEventOptions} containing the options for the call
* @return a {@link ServiceCall} with a result of type {@link ToolchainEventPost}
Expand Down Expand Up @@ -441,7 +431,7 @@ public ServiceCall<ToolchainToolPatch> updateTool(UpdateToolOptions updateToolOp
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithoutPrettyPrinting().toJson(updateToolOptions.toolchainToolPrototypePatch()), "application/merge-patch+json");
builder.bodyContent(com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls().toJson(updateToolOptions.toolchainToolPrototypePatch()), "application/merge-patch+json");
ResponseConverter<ToolchainToolPatch> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ToolchainToolPatch>() { }.getType());
return createServiceCall(builder.build(), responseConverter);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -10,6 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.continuous_delivery.cd_toolchain.v2.model;

import com.ibm.cloud.sdk.core.service.model.GenericModel;
Expand Down
Loading

0 comments on commit 16c8c0c

Please sign in to comment.