From a6f9b2c34d9d2aca9ecc5f17857be55d2b74f11d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 00:16:31 +0200 Subject: [PATCH 01/14] deps: update dependency com.google.cloud:google-cloud-storage to v2.7.0 (#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-storage](https://togithub.com/googleapis/java-storage) | `2.6.1` -> `2.7.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.7.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.7.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.7.1/compatibility-slim/2.6.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-storage/2.7.1/confidence-slim/2.6.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e7c8eb0..453c702 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-optimization - 0.1.2 + 1.0.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-optimization:0.1.2' +implementation 'com.google.cloud:google-cloud-optimization:1.0.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "0.1.2" +libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "1.0.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index b371c71..fd1f612 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-storage - 2.6.1 + 2.7.0 junit diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0790e9f..ce9ba0a 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -35,7 +35,7 @@ com.google.cloud google-cloud-storage - 2.6.1 + 2.7.0 junit From 0ddf4ccffbb678948dd939d7531d8af4c80be071 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 00:26:13 +0200 Subject: [PATCH 02/14] chore(deps): update dependency com.google.cloud:google-cloud-optimization to v1 (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-optimization](https://togithub.com/googleapis/java-optimization) | `0.1.2` -> `1.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/compatibility-slim/0.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-optimization/1.0.0/confidence-slim/0.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). --- samples/install-without-bom/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index fd1f612..db474b0 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-optimization - 0.1.2 + 1.0.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1de8918..38c1b18 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -43,7 +43,7 @@ com.google.cloud google-cloud-optimization - 0.1.2 + 1.0.0 com.google.cloud From 537ca7cd873facfdc2f3952e0246fc77d28df4af Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 04:14:21 +0000 Subject: [PATCH 03/14] chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 (#46) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 --- .../com/google/cloud/optimization/v1/FleetRoutingClient.java | 4 ---- .../cloud/optimization/v1/stub/FleetRoutingStubSettings.java | 1 - 2 files changed, 5 deletions(-) diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java index 4275fab..f76530e 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java @@ -16,7 +16,6 @@ package com.google.cloud.optimization.v1; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.rpc.OperationCallable; @@ -146,7 +145,6 @@ public static final FleetRoutingClient create(FleetRoutingSettings settings) thr * Constructs an instance of FleetRoutingClient, using the given stub for making calls. This is * for advanced usage - prefer using create(FleetRoutingSettings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final FleetRoutingClient create(FleetRoutingStub stub) { return new FleetRoutingClient(stub); } @@ -162,7 +160,6 @@ protected FleetRoutingClient(FleetRoutingSettings settings) throws IOException { this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected FleetRoutingClient(FleetRoutingStub stub) { this.settings = null; this.stub = stub; @@ -173,7 +170,6 @@ public final FleetRoutingSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public FleetRoutingStub getStub() { return stub; } diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java index ea19358..6c642e9 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java @@ -115,7 +115,6 @@ public UnaryCallSettings batchOptimizeTour return batchOptimizeToursOperationSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public FleetRoutingStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() From 5bf113a16b41f53dcef5cf280f2b22e1613c1a29 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:08:28 +0200 Subject: [PATCH 04/14] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 38c1b18..7ee76b2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -32,7 +32,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From 2eb448991ea0842b7a213957f30baac48e51760e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 19:10:18 +0200 Subject: [PATCH 05/14] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.0 (#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.4.0` -> `1.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.5.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​150-httpsgithubcomgoogleapisjava-shared-configcomparev140v150-2022-06-10) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.4.0...v1.5.0) ##### Features - add build scripts for native image testing in Java 17 ([#​1440](https://togithub.com/googleapis/java-shared-config/issues/1440)) ([#​475](https://togithub.com/googleapis/java-shared-config/issues/475)) ([e4dfc1b](https://togithub.com/googleapis/java-shared-config/commit/e4dfc1ba29295158c78c8fcf94467d2a6a33538a)) - to produce Java 8 compatible bytecode when using JDK 9+ ([2468276](https://togithub.com/googleapis/java-shared-config/commit/2468276145cdfe1ca911b52f765e026e77661a09)) ##### Dependencies - update surefire.version to v3.0.0-m7 ([bbfe663](https://togithub.com/googleapis/java-shared-config/commit/bbfe66393af3e49612c9c1e4334ba39c133ea1d0))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). --- google-cloud-optimization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-optimization-bom/pom.xml b/google-cloud-optimization-bom/pom.xml index b99dad7..09e23cf 100644 --- a/google-cloud-optimization-bom/pom.xml +++ b/google-cloud-optimization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 Google Cloud Fleet Routing BOM diff --git a/pom.xml b/pom.xml index 3adbfc9..e980249 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 From 6e5ccbb24fafb846f825b05c5b453789ea200395 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Tue, 14 Jun 2022 21:34:21 +0000 Subject: [PATCH 06/14] chore: include generated samples dir (#51) --- .github/.OwlBot.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 8bfbe60..e18774c 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -16,6 +16,7 @@ docker: image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" deep-remove-regex: +- "/samples/snippets/generated" - "/grpc-google-.*/src" - "/proto-google-.*/src" - "/google-.*/src" @@ -30,3 +31,5 @@ deep-copy-regex: dest: "/owl-bot-staging/$1/grpc-google-cloud-optimization-$1/src" - source: "/google/cloud/optimization/(v.*)/.*-java/gapic-google-.*/src" dest: "/owl-bot-staging/$1/google-cloud-optimization/src" +- source: "/google/cloud/optimization/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/$1/samples/snippets/generated" From 9d960a304dd3bdcf0c11bce0dbf8d8f9efd30f4d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:38:30 +0200 Subject: [PATCH 07/14] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-optimization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e980249..95896b1 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.12.0 + 2.13.0 pom import From e9284c1bd63cce756bda321edb3b2e0f9551efae Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:46:11 +0000 Subject: [PATCH 08/14] feat: Enable REST transport for most of Java and Go clients (#54) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 --- google-cloud-optimization/pom.xml | 16 + .../optimization/v1/FleetRoutingClient.java | 37 ++- .../optimization/v1/FleetRoutingSettings.java | 23 +- .../v1/stub/FleetRoutingStub.java | 6 +- .../v1/stub/FleetRoutingStubSettings.java | 53 +++- .../HttpJsonFleetRoutingCallableFactory.java | 105 +++++++ .../v1/stub/HttpJsonFleetRoutingStub.java | 287 ++++++++++++++++++ .../v1/FleetRoutingClientHttpJsonTest.java | 217 +++++++++++++ .../AsyncBatchOptimizeTours.java | 48 +++ .../AsyncBatchOptimizeToursLRO.java | 49 +++ .../SyncBatchOptimizeTours.java | 45 +++ .../SyncCreateSetCredentialsProvider.java | 41 +++ .../SyncCreateSetCredentialsProvider1.java | 40 +++ .../create/SyncCreateSetEndpoint.java | 38 +++ .../optimizetours/AsyncOptimizeTours.java | 66 ++++ .../optimizetours/SyncOptimizeTours.java | 62 ++++ .../optimizetours/SyncOptimizeTours.java | 45 +++ .../optimizetours/SyncOptimizeTours.java | 46 +++ 18 files changed, 1213 insertions(+), 11 deletions(-) create mode 100644 google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingCallableFactory.java create mode 100644 google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java create mode 100644 google-cloud-optimization/src/test/java/com/google/cloud/optimization/v1/FleetRoutingClientHttpJsonTest.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java create mode 100644 samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java diff --git a/google-cloud-optimization/pom.xml b/google-cloud-optimization/pom.xml index 93fd2df..f760855 100644 --- a/google-cloud-optimization/pom.xml +++ b/google-cloud-optimization/pom.xml @@ -58,6 +58,10 @@ com.google.api gax-grpc
+ + com.google.api + gax-httpjson + org.threeten threetenbp @@ -77,12 +81,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java index f76530e..9826c83 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java @@ -17,13 +17,13 @@ package com.google.cloud.optimization.v1; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.optimization.v1.stub.FleetRoutingStub; import com.google.cloud.optimization.v1.stub.FleetRoutingStubSettings; import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -120,13 +120,28 @@ * FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings); * } * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * FleetRoutingSettings fleetRoutingSettings =
+ *     FleetRoutingSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             FleetRoutingSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class FleetRoutingClient implements BackgroundResource { private final FleetRoutingSettings settings; private final FleetRoutingStub stub; - private final OperationsClient operationsClient; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of FleetRoutingClient with default settings. */ public static final FleetRoutingClient create() throws IOException { @@ -157,13 +172,17 @@ public static final FleetRoutingClient create(FleetRoutingStub stub) { protected FleetRoutingClient(FleetRoutingSettings settings) throws IOException { this.settings = settings; this.stub = ((FleetRoutingStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected FleetRoutingClient(FleetRoutingStub stub) { this.settings = null; this.stub = stub; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final FleetRoutingSettings getSettings() { @@ -178,10 +197,18 @@ public FleetRoutingStub getStub() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ - public final OperationsClient getOperationsClient() { + public final com.google.longrunning.OperationsClient getOperationsClient() { return operationsClient; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java index 93da45a..d945f64 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java @@ -21,6 +21,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -112,11 +113,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return FleetRoutingStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return FleetRoutingStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return FleetRoutingStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return FleetRoutingStubSettings.defaultTransportChannelProvider(); } @@ -126,11 +134,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return FleetRoutingStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -168,6 +182,11 @@ private static Builder createDefault() { return new Builder(FleetRoutingStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(FleetRoutingStubSettings.newHttpJsonBuilder()); + } + public FleetRoutingStubSettings.Builder getStubSettingsBuilder() { return ((FleetRoutingStubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStub.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStub.java index 4d71d13..a5b687b 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStub.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStub.java @@ -38,7 +38,11 @@ public abstract class FleetRoutingStub implements BackgroundResource { public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; } public UnaryCallable optimizeToursCallable() { diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java index 6c642e9..c65e70c 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java @@ -25,6 +25,9 @@ import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.longrunning.OperationSnapshot; import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; @@ -121,6 +124,11 @@ public FleetRoutingStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcFleetRoutingStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonFleetRoutingStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -153,18 +161,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(FleetRoutingStubSettings.class)) @@ -172,11 +187,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(FleetRoutingStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return FleetRoutingStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -294,6 +328,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .optimizeToursSettings() diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingCallableFactory.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingCallableFactory.java new file mode 100644 index 0000000..a72dc08 --- /dev/null +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the FleetRouting service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonFleetRoutingCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java new file mode 100644 index 0000000..de95502 --- /dev/null +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java @@ -0,0 +1,287 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.optimization.v1.AsyncModelMetadata; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.BatchOptimizeToursResponse; +import com.google.cloud.optimization.v1.OptimizeToursRequest; +import com.google.cloud.optimization.v1.OptimizeToursResponse; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the FleetRouting service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonFleetRoutingStub extends FleetRoutingStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(BatchOptimizeToursResponse.getDescriptor()) + .add(AsyncModelMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + optimizeToursMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.optimization.v1.FleetRouting/OptimizeTours") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:optimizeTours", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v1/{parent=projects/*}:optimizeTours") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(OptimizeToursResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchOptimizeToursMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.optimization.v1.FleetRouting/BatchOptimizeTours") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}:batchOptimizeTours", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths("/v1/{parent=projects/*}:batchOptimizeTours") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BatchOptimizeToursRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable optimizeToursCallable; + private final UnaryCallable batchOptimizeToursCallable; + private final OperationCallable< + BatchOptimizeToursRequest, BatchOptimizeToursResponse, AsyncModelMetadata> + batchOptimizeToursOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonFleetRoutingStub create(FleetRoutingStubSettings settings) + throws IOException { + return new HttpJsonFleetRoutingStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonFleetRoutingStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonFleetRoutingStub( + FleetRoutingStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonFleetRoutingStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonFleetRoutingStub( + FleetRoutingStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonFleetRoutingStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonFleetRoutingStub(FleetRoutingStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonFleetRoutingCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonFleetRoutingStub, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected HttpJsonFleetRoutingStub( + FleetRoutingStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings + optimizeToursTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(optimizeToursMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings batchOptimizeToursTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchOptimizeToursMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.optimizeToursCallable = + callableFactory.createUnaryCallable( + optimizeToursTransportSettings, settings.optimizeToursSettings(), clientContext); + this.batchOptimizeToursCallable = + callableFactory.createUnaryCallable( + batchOptimizeToursTransportSettings, + settings.batchOptimizeToursSettings(), + clientContext); + this.batchOptimizeToursOperationCallable = + callableFactory.createOperationCallable( + batchOptimizeToursTransportSettings, + settings.batchOptimizeToursOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(optimizeToursMethodDescriptor); + methodDescriptors.add(batchOptimizeToursMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable optimizeToursCallable() { + return optimizeToursCallable; + } + + @Override + public UnaryCallable batchOptimizeToursCallable() { + return batchOptimizeToursCallable; + } + + @Override + public OperationCallable< + BatchOptimizeToursRequest, BatchOptimizeToursResponse, AsyncModelMetadata> + batchOptimizeToursOperationCallable() { + return batchOptimizeToursOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-optimization/src/test/java/com/google/cloud/optimization/v1/FleetRoutingClientHttpJsonTest.java b/google-cloud-optimization/src/test/java/com/google/cloud/optimization/v1/FleetRoutingClientHttpJsonTest.java new file mode 100644 index 0000000..3bdd6cb --- /dev/null +++ b/google-cloud-optimization/src/test/java/com/google/cloud/optimization/v1/FleetRoutingClientHttpJsonTest.java @@ -0,0 +1,217 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.optimization.v1.stub.HttpJsonFleetRoutingStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Duration; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class FleetRoutingClientHttpJsonTest { + private static MockHttpService mockService; + private static FleetRoutingClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonFleetRoutingStub.getMethodDescriptors(), + FleetRoutingSettings.getDefaultEndpoint()); + FleetRoutingSettings settings = + FleetRoutingSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + FleetRoutingSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = FleetRoutingClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void optimizeToursTest() throws Exception { + OptimizeToursResponse expectedResponse = + OptimizeToursResponse.newBuilder() + .addAllRoutes(new ArrayList()) + .setRequestLabel("requestLabel1285152165") + .addAllSkippedShipments(new ArrayList()) + .addAllValidationErrors(new ArrayList()) + .setMetrics(OptimizeToursResponse.Metrics.newBuilder().build()) + .setTotalCost(-705890328) + .build(); + mockService.addResponse(expectedResponse); + + OptimizeToursRequest request = + OptimizeToursRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .setTimeout(Duration.newBuilder().build()) + .setModel(ShipmentModel.newBuilder().build()) + .setMaxValidationErrors(-1367418922) + .addAllInjectedFirstSolutionRoutes(new ArrayList()) + .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build()) + .addAllRefreshDetailsRoutes(new ArrayList()) + .setInterpretInjectedSolutionsUsingLabels(true) + .setConsiderRoadTraffic(true) + .setPopulatePolylines(true) + .setPopulateTransitionPolylines(true) + .setAllowLargeDeadlineDespiteInterruptionRisk(true) + .setUseGeodesicDistances(true) + .setGeodesicMetersPerSecond(-2129658905) + .setLabel("label102727412") + .setPopulateTravelStepPolylines(true) + .build(); + + OptimizeToursResponse actualResponse = client.optimizeTours(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void optimizeToursExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + OptimizeToursRequest request = + OptimizeToursRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .setTimeout(Duration.newBuilder().build()) + .setModel(ShipmentModel.newBuilder().build()) + .setMaxValidationErrors(-1367418922) + .addAllInjectedFirstSolutionRoutes(new ArrayList()) + .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build()) + .addAllRefreshDetailsRoutes(new ArrayList()) + .setInterpretInjectedSolutionsUsingLabels(true) + .setConsiderRoadTraffic(true) + .setPopulatePolylines(true) + .setPopulateTransitionPolylines(true) + .setAllowLargeDeadlineDespiteInterruptionRisk(true) + .setUseGeodesicDistances(true) + .setGeodesicMetersPerSecond(-2129658905) + .setLabel("label102727412") + .setPopulateTravelStepPolylines(true) + .build(); + client.optimizeTours(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchOptimizeToursTest() throws Exception { + BatchOptimizeToursResponse expectedResponse = BatchOptimizeToursResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchOptimizeToursTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .addAllModelConfigs(new ArrayList()) + .build(); + + BatchOptimizeToursResponse actualResponse = client.batchOptimizeToursAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchOptimizeToursExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent("projects/project-5833/locations/location-5833") + .addAllModelConfigs(new ArrayList()) + .build(); + client.batchOptimizeToursAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java new file mode 100644 index 0000000..005ceb6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_batchoptimizetours_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncBatchOptimizeTours { + + public static void main(String[] args) throws Exception { + asyncBatchOptimizeTours(); + } + + public static void asyncBatchOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) { + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent("parent-995424086") + .addAllModelConfigs(new ArrayList()) + .build(); + ApiFuture future = + fleetRoutingClient.batchOptimizeToursCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END optimization_v1_generated_fleetroutingclient_batchoptimizetours_async] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java new file mode 100644 index 0000000..c940969 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_batchoptimizetours_lro_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.optimization.v1.AsyncModelMetadata; +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.BatchOptimizeToursResponse; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import java.util.ArrayList; + +public class AsyncBatchOptimizeToursLRO { + + public static void main(String[] args) throws Exception { + asyncBatchOptimizeToursLRO(); + } + + public static void asyncBatchOptimizeToursLRO() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) { + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent("parent-995424086") + .addAllModelConfigs(new ArrayList()) + .build(); + OperationFuture future = + fleetRoutingClient.batchOptimizeToursOperationCallable().futureCall(request); + // Do something. + BatchOptimizeToursResponse response = future.get(); + } + } +} +// [END optimization_v1_generated_fleetroutingclient_batchoptimizetours_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java new file mode 100644 index 0000000..f619b46 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_batchoptimizetours_sync] +import com.google.cloud.optimization.v1.BatchOptimizeToursRequest; +import com.google.cloud.optimization.v1.BatchOptimizeToursResponse; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import java.util.ArrayList; + +public class SyncBatchOptimizeTours { + + public static void main(String[] args) throws Exception { + syncBatchOptimizeTours(); + } + + public static void syncBatchOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) { + BatchOptimizeToursRequest request = + BatchOptimizeToursRequest.newBuilder() + .setParent("parent-995424086") + .addAllModelConfigs(new ArrayList()) + .build(); + BatchOptimizeToursResponse response = + fleetRoutingClient.batchOptimizeToursAsync(request).get(); + } + } +} +// [END optimization_v1_generated_fleetroutingclient_batchoptimizetours_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 0000000..a12b132 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.FleetRoutingSettings; +import com.google.cloud.optimization.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + FleetRoutingSettings fleetRoutingSettings = + FleetRoutingSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings); + } +} +// [END optimization_v1_generated_fleetroutingclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 0000000..3e68985 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_create_setcredentialsprovider1_sync] +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.FleetRoutingSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + FleetRoutingSettings fleetRoutingSettings = + FleetRoutingSettings.newBuilder() + .setTransportChannelProvider( + FleetRoutingSettings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings); + } +} +// [END optimization_v1_generated_fleetroutingclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java new file mode 100644 index 0000000..f264383 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_create_setendpoint_sync] +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.FleetRoutingSettings; +import com.google.cloud.optimization.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + FleetRoutingSettings fleetRoutingSettings = + FleetRoutingSettings.newBuilder().setEndpoint(myEndpoint).build(); + FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings); + } +} +// [END optimization_v1_generated_fleetroutingclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java new file mode 100644 index 0000000..61eda2d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java @@ -0,0 +1,66 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_optimizetours_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.InjectedSolutionConstraint; +import com.google.cloud.optimization.v1.OptimizeToursRequest; +import com.google.cloud.optimization.v1.OptimizeToursResponse; +import com.google.cloud.optimization.v1.ShipmentModel; +import com.google.cloud.optimization.v1.ShipmentRoute; +import com.google.protobuf.Duration; +import java.util.ArrayList; + +public class AsyncOptimizeTours { + + public static void main(String[] args) throws Exception { + asyncOptimizeTours(); + } + + public static void asyncOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) { + OptimizeToursRequest request = + OptimizeToursRequest.newBuilder() + .setParent("parent-995424086") + .setTimeout(Duration.newBuilder().build()) + .setModel(ShipmentModel.newBuilder().build()) + .setMaxValidationErrors(-1367418922) + .addAllInjectedFirstSolutionRoutes(new ArrayList()) + .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build()) + .addAllRefreshDetailsRoutes(new ArrayList()) + .setInterpretInjectedSolutionsUsingLabels(true) + .setConsiderRoadTraffic(true) + .setPopulatePolylines(true) + .setPopulateTransitionPolylines(true) + .setAllowLargeDeadlineDespiteInterruptionRisk(true) + .setUseGeodesicDistances(true) + .setGeodesicMetersPerSecond(-2129658905) + .setLabel("label102727412") + .setPopulateTravelStepPolylines(true) + .build(); + ApiFuture future = + fleetRoutingClient.optimizeToursCallable().futureCall(request); + // Do something. + OptimizeToursResponse response = future.get(); + } + } +} +// [END optimization_v1_generated_fleetroutingclient_optimizetours_async] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java new file mode 100644 index 0000000..ad5f8da --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingclient_optimizetours_sync] +import com.google.cloud.optimization.v1.FleetRoutingClient; +import com.google.cloud.optimization.v1.InjectedSolutionConstraint; +import com.google.cloud.optimization.v1.OptimizeToursRequest; +import com.google.cloud.optimization.v1.OptimizeToursResponse; +import com.google.cloud.optimization.v1.ShipmentModel; +import com.google.cloud.optimization.v1.ShipmentRoute; +import com.google.protobuf.Duration; +import java.util.ArrayList; + +public class SyncOptimizeTours { + + public static void main(String[] args) throws Exception { + syncOptimizeTours(); + } + + public static void syncOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) { + OptimizeToursRequest request = + OptimizeToursRequest.newBuilder() + .setParent("parent-995424086") + .setTimeout(Duration.newBuilder().build()) + .setModel(ShipmentModel.newBuilder().build()) + .setMaxValidationErrors(-1367418922) + .addAllInjectedFirstSolutionRoutes(new ArrayList()) + .setInjectedSolutionConstraint(InjectedSolutionConstraint.newBuilder().build()) + .addAllRefreshDetailsRoutes(new ArrayList()) + .setInterpretInjectedSolutionsUsingLabels(true) + .setConsiderRoadTraffic(true) + .setPopulatePolylines(true) + .setPopulateTransitionPolylines(true) + .setAllowLargeDeadlineDespiteInterruptionRisk(true) + .setUseGeodesicDistances(true) + .setGeodesicMetersPerSecond(-2129658905) + .setLabel("label102727412") + .setPopulateTravelStepPolylines(true) + .build(); + OptimizeToursResponse response = fleetRoutingClient.optimizeTours(request); + } + } +} +// [END optimization_v1_generated_fleetroutingclient_optimizetours_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java new file mode 100644 index 0000000..563228a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.samples; + +// [START optimization_v1_generated_fleetroutingsettings_optimizetours_sync] +import com.google.cloud.optimization.v1.FleetRoutingSettings; +import java.time.Duration; + +public class SyncOptimizeTours { + + public static void main(String[] args) throws Exception { + syncOptimizeTours(); + } + + public static void syncOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + FleetRoutingSettings.Builder fleetRoutingSettingsBuilder = FleetRoutingSettings.newBuilder(); + fleetRoutingSettingsBuilder + .optimizeToursSettings() + .setRetrySettings( + fleetRoutingSettingsBuilder + .optimizeToursSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FleetRoutingSettings fleetRoutingSettings = fleetRoutingSettingsBuilder.build(); + } +} +// [END optimization_v1_generated_fleetroutingsettings_optimizetours_sync] diff --git a/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java b/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java new file mode 100644 index 0000000..931c07b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on 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.google.cloud.optimization.v1.stub.samples; + +// [START optimization_v1_generated_fleetroutingstubsettings_optimizetours_sync] +import com.google.cloud.optimization.v1.stub.FleetRoutingStubSettings; +import java.time.Duration; + +public class SyncOptimizeTours { + + public static void main(String[] args) throws Exception { + syncOptimizeTours(); + } + + public static void syncOptimizeTours() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + FleetRoutingStubSettings.Builder fleetRoutingSettingsBuilder = + FleetRoutingStubSettings.newBuilder(); + fleetRoutingSettingsBuilder + .optimizeToursSettings() + .setRetrySettings( + fleetRoutingSettingsBuilder + .optimizeToursSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + FleetRoutingStubSettings fleetRoutingSettings = fleetRoutingSettingsBuilder.build(); + } +} +// [END optimization_v1_generated_fleetroutingstubsettings_optimizetours_sync] From 1a9965094c8d1ad166ccd86daa991ff4d72ab8c3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:22:37 +0000 Subject: [PATCH 09/14] chore: update dependencies for regapic (#1467) (#55) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f062..f0625e4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f4..f8f957a 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From fa1904610fe7a42131e6802e126eab131b674846 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 04:16:33 +0000 Subject: [PATCH 10/14] fix: update gapic-generator-java with mock service generation fixes (#56) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 457524730 Source-Link: https://github.com/googleapis/googleapis/commit/917e7f21cb1dc062744c6694437cdd46219f28cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/2497f9a069d3f6b2d6810d5a4e239cda1e7e5a39 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjQ5N2Y5YTA2OWQzZjZiMmQ2ODEwZDVhNGUyMzljZGExZTdlNWEzOSJ9 --- .../com/google/cloud/optimization/v1/FleetRoutingClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java index 9826c83..9e39a2e 100644 --- a/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java +++ b/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java @@ -16,6 +16,7 @@ package com.google.cloud.optimization.v1; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -205,6 +206,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } From 01027feea242af31bf20e69d506e7e1d712afa8a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:20:29 +0000 Subject: [PATCH 11/14] chore: Disable CLIRR checks on releas (#1474) (#58) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4..a454a61 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8..1dba8de 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From 40702ad529b5cad65ae9231f1a1809d5b2b2e235 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 03:54:30 +0000 Subject: [PATCH 12/14] chore(main): release 1.0.1-SNAPSHOT (#47) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-optimization-bom/pom.xml | 8 ++++---- google-cloud-optimization/pom.xml | 4 ++-- grpc-google-cloud-optimization-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-optimization-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-optimization-bom/pom.xml b/google-cloud-optimization-bom/pom.xml index 09e23cf..73db1ab 100644 --- a/google-cloud-optimization-bom/pom.xml +++ b/google-cloud-optimization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-optimization-bom - 1.0.0 + 1.0.1-SNAPSHOT pom com.google.cloud @@ -65,17 +65,17 @@ com.google.cloud google-cloud-optimization - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/google-cloud-optimization/pom.xml b/google-cloud-optimization/pom.xml index f760855..932c7e2 100644 --- a/google-cloud-optimization/pom.xml +++ b/google-cloud-optimization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-optimization - 1.0.0 + 1.0.1-SNAPSHOT jar Google Cloud Fleet Routing https://github.com/googleapis/java-optimization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-optimization-parent - 1.0.0 + 1.0.1-SNAPSHOT google-cloud-optimization diff --git a/grpc-google-cloud-optimization-v1/pom.xml b/grpc-google-cloud-optimization-v1/pom.xml index 2ae6d97..5990daa 100644 --- a/grpc-google-cloud-optimization-v1/pom.xml +++ b/grpc-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT grpc-google-cloud-optimization-v1 GRPC library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 95896b1..dd54d84 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-optimization-parent pom - 1.0.0 + 1.0.1-SNAPSHOT Google Cloud Fleet Routing Parent https://github.com/googleapis/java-optimization @@ -69,17 +69,17 @@ com.google.cloud google-cloud-optimization - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/proto-google-cloud-optimization-v1/pom.xml b/proto-google-cloud-optimization-v1/pom.xml index 07d6c1b..d8cb55c 100644 --- a/proto-google-cloud-optimization-v1/pom.xml +++ b/proto-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.0 + 1.0.1-SNAPSHOT proto-google-cloud-optimization-v1 Proto library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ce9ba0a..ffbe3ce 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-optimization - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 8ca1918..f20b2c2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-optimization:1.0.0:1.0.0 -proto-google-cloud-optimization-v1:1.0.0:1.0.0 -grpc-google-cloud-optimization-v1:1.0.0:1.0.0 +google-cloud-optimization:1.0.0:1.0.1-SNAPSHOT +proto-google-cloud-optimization-v1:1.0.0:1.0.1-SNAPSHOT +grpc-google-cloud-optimization-v1:1.0.0:1.0.1-SNAPSHOT From 954b7f24e33abc0ac07034ef983421e0934ba9af Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Jul 2022 10:32:13 -0400 Subject: [PATCH 13/14] ci: removing clirr from required checks (#57) Making CLIRR not required. The version bumps are now controlled by the Release Please and OwlBot. The CL authors create appropriate change description to control major version bumps. --- .github/sync-repo-settings.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4ebfe4b..4ea0953 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -44,7 +44,6 @@ branchProtectionRules: - "dependencies (8)" - "dependencies (11)" - "lint" - - "clirr" - "units (8)" - "units (11)" - "Kokoro - Test: Integration" From c61f884055dc48d7ce35c039b39bc1c67c16e059 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:18:41 +0000 Subject: [PATCH 14/14] chore(main): release 1.1.0 (#59) :robot: I have created a release *beep* *boop* --- ## [1.1.0](https://github.com/googleapis/java-optimization/compare/v1.0.0...v1.1.0) (2022-07-01) ### Features * Enable REST transport for most of Java and Go clients ([#54](https://github.com/googleapis/java-optimization/issues/54)) ([e9284c1](https://github.com/googleapis/java-optimization/commit/e9284c1bd63cce756bda321edb3b2e0f9551efae)) ### Bug Fixes * update gapic-generator-java with mock service generation fixes ([#56](https://github.com/googleapis/java-optimization/issues/56)) ([fa19046](https://github.com/googleapis/java-optimization/commit/fa1904610fe7a42131e6802e126eab131b674846)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#53](https://github.com/googleapis/java-optimization/issues/53)) ([9d960a3](https://github.com/googleapis/java-optimization/commit/9d960a304dd3bdcf0c11bce0dbf8d8f9efd30f4d)) * update dependency com.google.cloud:google-cloud-storage to v2.7.0 ([#49](https://github.com/googleapis/java-optimization/issues/49)) ([a6f9b2c](https://github.com/googleapis/java-optimization/commit/a6f9b2c34d9d2aca9ecc5f17857be55d2b74f11d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 18 ++++++++++++++++++ google-cloud-optimization-bom/pom.xml | 8 ++++---- google-cloud-optimization/pom.xml | 4 ++-- grpc-google-cloud-optimization-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-optimization-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 8 files changed, 36 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7503481..c977d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [1.1.0](https://github.com/googleapis/java-optimization/compare/v1.0.0...v1.1.0) (2022-07-01) + + +### Features + +* Enable REST transport for most of Java and Go clients ([#54](https://github.com/googleapis/java-optimization/issues/54)) ([e9284c1](https://github.com/googleapis/java-optimization/commit/e9284c1bd63cce756bda321edb3b2e0f9551efae)) + + +### Bug Fixes + +* update gapic-generator-java with mock service generation fixes ([#56](https://github.com/googleapis/java-optimization/issues/56)) ([fa19046](https://github.com/googleapis/java-optimization/commit/fa1904610fe7a42131e6802e126eab131b674846)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#53](https://github.com/googleapis/java-optimization/issues/53)) ([9d960a3](https://github.com/googleapis/java-optimization/commit/9d960a304dd3bdcf0c11bce0dbf8d8f9efd30f4d)) +* update dependency com.google.cloud:google-cloud-storage to v2.7.0 ([#49](https://github.com/googleapis/java-optimization/issues/49)) ([a6f9b2c](https://github.com/googleapis/java-optimization/commit/a6f9b2c34d9d2aca9ecc5f17857be55d2b74f11d)) + ## [1.0.0](https://github.com/googleapis/java-optimization/compare/v0.1.2...v1.0.0) (2022-05-19) diff --git a/google-cloud-optimization-bom/pom.xml b/google-cloud-optimization-bom/pom.xml index 73db1ab..c92fce8 100644 --- a/google-cloud-optimization-bom/pom.xml +++ b/google-cloud-optimization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-optimization-bom - 1.0.1-SNAPSHOT + 1.1.0 pom com.google.cloud @@ -65,17 +65,17 @@ com.google.cloud google-cloud-optimization - 1.0.1-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 diff --git a/google-cloud-optimization/pom.xml b/google-cloud-optimization/pom.xml index 932c7e2..2113a30 100644 --- a/google-cloud-optimization/pom.xml +++ b/google-cloud-optimization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-optimization - 1.0.1-SNAPSHOT + 1.1.0 jar Google Cloud Fleet Routing https://github.com/googleapis/java-optimization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-optimization-parent - 1.0.1-SNAPSHOT + 1.1.0 google-cloud-optimization diff --git a/grpc-google-cloud-optimization-v1/pom.xml b/grpc-google-cloud-optimization-v1/pom.xml index 5990daa..f80a0bb 100644 --- a/grpc-google-cloud-optimization-v1/pom.xml +++ b/grpc-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 grpc-google-cloud-optimization-v1 GRPC library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.0.1-SNAPSHOT + 1.1.0 diff --git a/pom.xml b/pom.xml index dd54d84..14509cf 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-optimization-parent pom - 1.0.1-SNAPSHOT + 1.1.0 Google Cloud Fleet Routing Parent https://github.com/googleapis/java-optimization @@ -69,17 +69,17 @@ com.google.cloud google-cloud-optimization - 1.0.1-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 diff --git a/proto-google-cloud-optimization-v1/pom.xml b/proto-google-cloud-optimization-v1/pom.xml index d8cb55c..2ad5228 100644 --- a/proto-google-cloud-optimization-v1/pom.xml +++ b/proto-google-cloud-optimization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-optimization-v1 - 1.0.1-SNAPSHOT + 1.1.0 proto-google-cloud-optimization-v1 Proto library for google-cloud-optimization com.google.cloud google-cloud-optimization-parent - 1.0.1-SNAPSHOT + 1.1.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index ffbe3ce..e36e5da 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-optimization - 1.0.1-SNAPSHOT + 1.1.0 diff --git a/versions.txt b/versions.txt index f20b2c2..5acbbcb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-optimization:1.0.0:1.0.1-SNAPSHOT -proto-google-cloud-optimization-v1:1.0.0:1.0.1-SNAPSHOT -grpc-google-cloud-optimization-v1:1.0.0:1.0.1-SNAPSHOT +google-cloud-optimization:1.1.0:1.1.0 +proto-google-cloud-optimization-v1:1.1.0:1.1.0 +grpc-google-cloud-optimization-v1:1.1.0:1.1.0