From 682a7cf281d39699a914f8183e724a750da17fea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 Jan 2021 03:18:15 +0100 Subject: [PATCH 01/28] chore(deps): update dependency com.google.cloud:google-cloud-bigqueryreservation to v1.0.8 (#297) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 55603142..833a819d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.7 + 1.0.8 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f08dc068..51ba8df3 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.7 + 1.0.8 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f64eb6d7..7811647f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -41,7 +41,7 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.7 + 1.0.8 From 17cf7625fff4ca6000e0276b7d50b9beebb2134c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 02:24:08 +0000 Subject: [PATCH 02/28] chore: release 1.0.9-SNAPSHOT (#298) :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-bigqueryreservation-bom/pom.xml | 8 ++++---- google-cloud-bigqueryreservation/pom.xml | 4 ++-- grpc-google-cloud-bigqueryreservation-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-bigqueryreservation-v1/pom.xml | 4 ++-- versions.txt | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/google-cloud-bigqueryreservation-bom/pom.xml b/google-cloud-bigqueryreservation-bom/pom.xml index bca786e2..f69cf7b2 100644 --- a/google-cloud-bigqueryreservation-bom/pom.xml +++ b/google-cloud-bigqueryreservation-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation-bom - 1.0.8 + 1.0.9-SNAPSHOT pom com.google.cloud @@ -64,17 +64,17 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/google-cloud-bigqueryreservation/pom.xml b/google-cloud-bigqueryreservation/pom.xml index 12fda959..b53f1c39 100644 --- a/google-cloud-bigqueryreservation/pom.xml +++ b/google-cloud-bigqueryreservation/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation - 1.0.8 + 1.0.9-SNAPSHOT jar Google Cloud BigQuery Reservations https://github.com/googleapis/java-bigqueryreservation @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.8 + 1.0.9-SNAPSHOT google-cloud-bigqueryreservation diff --git a/grpc-google-cloud-bigqueryreservation-v1/pom.xml b/grpc-google-cloud-bigqueryreservation-v1/pom.xml index 049b9601..817ca90b 100644 --- a/grpc-google-cloud-bigqueryreservation-v1/pom.xml +++ b/grpc-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT grpc-google-cloud-bigqueryreservation-v1 GRPC library for grpc-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/pom.xml b/pom.xml index 7af0efe0..bf7d85f5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryreservation-parent pom - 1.0.8 + 1.0.9-SNAPSHOT Google Cloud BigQuery Reservations Parent https://github.com/googleapis/java-bigqueryreservation @@ -70,17 +70,17 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/proto-google-cloud-bigqueryreservation-v1/pom.xml b/proto-google-cloud-bigqueryreservation-v1/pom.xml index 28518292..13f25c97 100644 --- a/proto-google-cloud-bigqueryreservation-v1/pom.xml +++ b/proto-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.8 + 1.0.9-SNAPSHOT proto-google-cloud-bigqueryreservation-v1 PROTO library for proto-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/versions.txt b/versions.txt index 5f71093e..d0d7d47c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-bigqueryreservation:1.0.8:1.0.8 -proto-google-cloud-bigqueryreservation-v1:1.0.8:1.0.8 -grpc-google-cloud-bigqueryreservation-v1:1.0.8:1.0.8 +google-cloud-bigqueryreservation:1.0.8:1.0.9-SNAPSHOT +proto-google-cloud-bigqueryreservation-v1:1.0.8:1.0.9-SNAPSHOT +grpc-google-cloud-bigqueryreservation-v1:1.0.8:1.0.9-SNAPSHOT From f0de426aafdc9f8161dbb2b0b606c338146e11da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 13 Jan 2021 18:26:11 -0800 Subject: [PATCH 03/28] chore: regenerate README (#299) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2021-01-14 02:20:26,395 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigqueryreservation/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-01-14 02:20:27,297 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/26609bd5-613e-4c54-8601-9b525638ea6d/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 5ef4d8e2..23496411 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "4ea8e982c0c089112600b4d16dcebd05dea17919" + "sha": "682a7cf281d39699a914f8183e724a750da17fea" } }, { diff --git a/README.md b/README.md index c9aad5ae..0109def9 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,18 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-bigqueryreservation - 1.0.7 + 1.0.8 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-bigqueryreservation:1.0.7' +compile 'com.google.cloud:google-cloud-bigqueryreservation:1.0.8' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "1.0.7" +libraryDependencies += "com.google.cloud" % "google-cloud-bigqueryreservation" % "1.0.8" ``` ## Authentication From 8ec335115c76e0415e71915251f58787288a453e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Jan 2021 17:36:18 +0100 Subject: [PATCH 04/28] chore(deps): update dependency com.google.cloud:libraries-bom to v16.3.0 (#300) --- 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 7811647f..03d94a5e 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.1 + 16.3.0 pom import From 7199e0a2d7f7f8b5d03a21fbae96ee7f8828c750 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Fri, 22 Jan 2021 14:06:11 -0500 Subject: [PATCH 05/28] docs(samples): add quickstart sample (#302) * docs(samples): add quickstart sample * nit * update license headers * update license headers --- .../bigqueryreservation/QuickstartSample.java | 51 +++++++++++++++ .../QuickstartSampleIT.java | 65 +++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java create mode 100644 samples/snippets/src/test/java/com/example/bigqueryreservation/QuickstartSampleIT.java diff --git a/samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java b/samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java new file mode 100644 index 00000000..d2b1df52 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2021 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 + * + * http://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.example.bigqueryreservation; + +// [START bigqueryreservation_quickstart] +import com.google.cloud.bigquery.reservation.v1.ReservationServiceClient; +import java.io.IOException; + +public class QuickstartSample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace these variables before running the sample. + String projectId = "YOUR_PROJECT_ID"; + String location = "LOCATION"; + quickStartSample(projectId, location); + } + + public static void quickStartSample(String projectId, String location) throws IOException { + try (ReservationServiceClient client = ReservationServiceClient.create()) { + // list reservations in the project + String parent = String.format("projects/%s/locations/%s", projectId, location); + client + .listReservations(parent) + .iterateAll() + .forEach(res -> System.out.println("Reservation resource name: " + res.getName())); + + // list capacity commitments in the project + client + .listCapacityCommitments(parent) + .iterateAll() + .forEach( + commitment -> + System.out.println("Capacity commitment resource name: " + commitment.getName())); + } + } +} +// [END bigqueryreservation_quickstart] diff --git a/samples/snippets/src/test/java/com/example/bigqueryreservation/QuickstartSampleIT.java b/samples/snippets/src/test/java/com/example/bigqueryreservation/QuickstartSampleIT.java new file mode 100644 index 00000000..605477ad --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigqueryreservation/QuickstartSampleIT.java @@ -0,0 +1,65 @@ +/* + * Copyright 2021 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 + * + * http://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.example.bigqueryreservation; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for quickstart sample. */ +@RunWith(JUnit4.class) +@SuppressWarnings("checkstyle:abbreviationaswordinname") +public class QuickstartSampleIT { + + private static final Logger LOG = Logger.getLogger(QuickstartSampleIT.class.getName()); + private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testQuickstart() throws Exception { + QuickstartSample.quickStartSample(PROJECT_ID, "US"); + String got = bout.toString(); + assertThat(got).contains("resource name:"); + } +} From a450eee23cdce58c82401dfd98f26e16fe17ffaf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 22 Jan 2021 11:14:03 -0800 Subject: [PATCH 06/28] chore: regenerate README (#304) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2021-01-22 19:08:18,311 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigqueryreservation/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working tree clean 2021-01-22 19:08:19,216 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/fbcf22dd-0938-4513-b3ca-9257d939e1c9/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 23496411..485027d0 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "682a7cf281d39699a914f8183e724a750da17fea" + "sha": "7199e0a2d7f7f8b5d03a21fbae96ee7f8828c750" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "16ec872dd898d7de6e1822badfac32484b5d9031" + "sha": "b259489b06b25f399768b74b8baa943991f38ea7" } } ] diff --git a/README.md b/README.md index 0109def9..20847772 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,16 @@ use this Cloud BigQuery Reservation Client Library. +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/java-bigqueryreservation/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart Sample | [source code](https://github.com/googleapis/java-bigqueryreservation/blob/master/samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigqueryreservation&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigqueryreservation/QuickstartSample.java) | + + ## Troubleshooting From 59297ed8567e5bdda31919b2a692d12662fca306 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Jan 2021 19:32:13 +0100 Subject: [PATCH 07/28] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v0.10.0 (#306) [![WhiteSource 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) | `0.9.4` -> `0.10.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.10.0/compatibility-slim/0.9.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/0.10.0/confidence-slim/0.9.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v0.10.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​0100-httpswwwgithubcomgoogleapisjava-shared-configcomparev094v0100-2021-01-21) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.9.4...v0.10.0) ##### Features - adding pom profile to generate docfx yml from javadoc ([#​213](https://www.github.com/googleapis/java-shared-config/issues/213)) ([3527c47](https://www.github.com/googleapis/java-shared-config/commit/3527c47ff413d415f87fccca84358da2c837841d)) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v8.39 ([#​209](https://www.github.com/googleapis/java-shared-config/issues/209)) ([fb53922](https://www.github.com/googleapis/java-shared-config/commit/fb539226d407001822a56c7fff792922cd85d1fe)) ##### [0.9.4](https://www.github.com/googleapis/java-shared-config/compare/v0.9.3...v0.9.4) (2020-10-21) ##### Documentation - Latest for Cloud-RAD ([#​199](https://www.github.com/googleapis/java-shared-config/issues/199)) ([34712af](https://www.github.com/googleapis/java-shared-config/commit/34712afac58aa0d148f0843026b3ff770ee030c2)) ##### [0.9.3](https://www.github.com/googleapis/java-shared-config/compare/v0.9.2...v0.9.3) (2020-10-15) ##### Dependencies - update auto-value-annotation.version to v1.7.4 ([#​157](https://www.github.com/googleapis/java-shared-config/issues/157)) ([5d7e394](https://www.github.com/googleapis/java-shared-config/commit/5d7e394d964010a3e32af492cec4be85aabc3ebf)) ##### [0.9.2](https://www.github.com/googleapis/java-shared-config/compare/v0.9.1...v0.9.2) (2020-07-02) ##### Dependencies - update dependency org.apache.maven.surefire:surefire-junit47 to v3.0.0-M5 ([#​180](https://www.github.com/googleapis/java-shared-config/issues/180)) ([802d9c5](https://www.github.com/googleapis/java-shared-config/commit/802d9c528d34b386face69ca75a014ce57fc3ac1)) ##### [0.9.1](https://www.github.com/googleapis/java-shared-config/compare/v0.9.0...v0.9.1) (2020-07-01) ##### Bug Fixes - maven-dependency-plugin configuration breaking downstream config ([#​174](https://www.github.com/googleapis/java-shared-config/issues/174)) ([507217f](https://www.github.com/googleapis/java-shared-config/commit/507217fe509cd4f16eb50c8075ab43229238e08d)) ##### Documentation - change Devsite output path to /java/docs/reference ([#​176](https://www.github.com/googleapis/java-shared-config/issues/176)) ([8b98af5](https://www.github.com/googleapis/java-shared-config/commit/8b98af54bf503d97bb86b6d02a5c4301b39384e1))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigqueryreservation). --- google-cloud-bigqueryreservation-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigqueryreservation-bom/pom.xml b/google-cloud-bigqueryreservation-bom/pom.xml index f69cf7b2..c6215487 100644 --- a/google-cloud-bigqueryreservation-bom/pom.xml +++ b/google-cloud-bigqueryreservation-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 Google Cloud BigQuery Reservation BOM diff --git a/pom.xml b/pom.xml index bf7d85f5..f107b544 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 From 18f5e983cf21ed7f44d626651a7aa7b22cd6187e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 26 Jan 2021 11:18:22 -0800 Subject: [PATCH 08/28] chore: adding docfx doclet resource (#307) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0682260c-cab8-4c72-936d-852570cd9d26/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3816b080296d4d52975079fd26c110dd26ba25af --- .kokoro/release/publish_javadoc.cfg | 3 +++ synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 4e5ffe0f..20814ac0 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -27,3 +27,6 @@ before_action { } } } + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 47a1f993..7f482370 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "4e7b5bf50ede67982adabda19cd110b544729e38" + "sha": "a450eee23cdce58c82401dfd98f26e16fe17ffaf" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" + "sha": "3816b080296d4d52975079fd26c110dd26ba25af" } } ], From e4175cfd24ac088f164a230c2700e1901a689acf Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 28 Jan 2021 22:14:47 -0800 Subject: [PATCH 09/28] build: migrate to flakybot (#308) --- .kokoro/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2e2be1c8..6a7458d0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -110,8 +110,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-bigqueryreservation + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-bigqueryreservation fi echo "exiting with ${RETURN_CODE}" From 429cff4f559d410f3e512b6291f600203b47c8f4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 2 Feb 2021 09:36:25 -0800 Subject: [PATCH 10/28] chore: regen common templates (#309) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .kokoro/build.sh | 4 ++-- synth.metadata | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 6a7458d0..2e2be1c8 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -110,8 +110,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot - ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-bigqueryreservation + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-bigqueryreservation fi echo "exiting with ${RETURN_CODE}" diff --git a/synth.metadata b/synth.metadata index 7f482370..d43cd6c7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "a450eee23cdce58c82401dfd98f26e16fe17ffaf" + "sha": "e4175cfd24ac088f164a230c2700e1901a689acf" } }, { From b1457feb748ceef8e361dc374ece6930c5cd08fb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 2 Feb 2021 09:36:41 -0800 Subject: [PATCH 11/28] chore: regen common templates (#310) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * build: migrate to flakybot Source-Author: Justin Beckwith Source-Date: Thu Jan 28 22:22:38 2021 -0800 Source-Repo: googleapis/synthtool Source-Sha: d1bb9173100f62c0cfc8f3138b62241e7f47ca6a Source-Link: https://github.com/googleapis/synthtool/commit/d1bb9173100f62c0cfc8f3138b62241e7f47ca6a * build(java): generate docfx yml on release * feat: generate docfx yml on release * fix: updates name variable * fix: remove non needed resource * fix: update date Source-Author: Emily Ball Source-Date: Mon Feb 1 15:24:59 2021 -0800 Source-Repo: googleapis/synthtool Source-Sha: 5de29e9434b63ea6d7e46dc348521c62969af1a1 Source-Link: https://github.com/googleapis/synthtool/commit/5de29e9434b63ea6d7e46dc348521c62969af1a1 --- .kokoro/release/publish_javadoc.cfg | 5 +-- .kokoro/release/publish_javadoc11.cfg | 30 +++++++++++++++ .kokoro/release/publish_javadoc11.sh | 55 +++++++++++++++++++++++++++ synth.metadata | 4 +- 4 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 .kokoro/release/publish_javadoc11.cfg create mode 100755 .kokoro/release/publish_javadoc11.sh diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 20814ac0..6bdad086 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -26,7 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} - -# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 00000000..2ddd71ce --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" + # Production will be at: docs-staging-v2 +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-memcache/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 00000000..9da1e5ef --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# 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 +# +# http://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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-bigqueryreservation +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/synth.metadata b/synth.metadata index d43cd6c7..ca6b01df 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3816b080296d4d52975079fd26c110dd26ba25af" + "sha": "5de29e9434b63ea6d7e46dc348521c62969af1a1" } } ], @@ -91,6 +91,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", From 779fcd126838fd42c3b37f46beaff8e532e062f6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 09:09:10 -0800 Subject: [PATCH 12/28] chore: Re-generated to pick up changes from synthtool. (#312) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * build(java): run linkage monitor as GitHub action Source-Author: Tomo Suzuki Source-Date: Tue Feb 2 16:20:26 2021 -0500 Source-Repo: googleapis/synthtool Source-Sha: e935c9ecb47da0f2e054f5f1845f7cf7c95fa625 Source-Link: https://github.com/googleapis/synthtool/commit/e935c9ecb47da0f2e054f5f1845f7cf7c95fa625 --- .github/workflows/ci.yaml | 13 ++++++++++- .kokoro/build.sh | 4 ++-- .kokoro/linkage-monitor.sh | 46 -------------------------------------- synth.metadata | 5 ++--- 4 files changed, 16 insertions(+), 52 deletions(-) delete mode 100755 .kokoro/linkage-monitor.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68302207..98a472e1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,18 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - name: Install artifacts to local Maven repository + run: | + source .kokoro/common.sh + retry_with_backoff 3 10 \ + mvn install -B -V \ + -Dmaven.test.skip -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true + shell: bash + - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2e2be1c8..6a7458d0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -110,8 +110,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-bigqueryreservation + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-bigqueryreservation fi echo "exiting with ${RETURN_CODE}" diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2..00000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2019 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 -# -# http://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. - -set -eo pipefail -# Display commands being run. -set -x - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/synth.metadata b/synth.metadata index ca6b01df..c7874864 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "e4175cfd24ac088f164a230c2700e1901a689acf" + "sha": "b1457feb748ceef8e361dc374ece6930c5cd08fb" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5de29e9434b63ea6d7e46dc348521c62969af1a1" + "sha": "e935c9ecb47da0f2e054f5f1845f7cf7c95fa625" } } ], @@ -59,7 +59,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", From 3bf6cc2af09041d8f54d335b530b648ac2c57525 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 11:22:43 -0800 Subject: [PATCH 13/28] chore: regen common template (#311) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. From 03d320160a8525cccb964b2845d5373abaff07bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 08:45:56 -0800 Subject: [PATCH 14/28] build(java): update autorelease branch name check (#314) In response to the new multi release branch changes. Source-Author: Stephanie Wang Source-Date: Wed Feb 3 15:06:07 2021 -0500 Source-Repo: googleapis/synthtool Source-Sha: 140ba24a136c63e7f10a998a63e7898aed63ea7d Source-Link: https://github.com/googleapis/synthtool/commit/140ba24a136c63e7f10a998a63e7898aed63ea7d --- .github/workflows/auto-release.yaml | 2 +- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc9..76e6404b 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -17,7 +17,7 @@ jobs: } // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/synth.metadata b/synth.metadata index c7874864..2b3cc035 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "b1457feb748ceef8e361dc374ece6930c5cd08fb" + "sha": "3bf6cc2af09041d8f54d335b530b648ac2c57525" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e935c9ecb47da0f2e054f5f1845f7cf7c95fa625" + "sha": "140ba24a136c63e7f10a998a63e7898aed63ea7d" } } ], From 624c7890b9d2e6c4ea526ad909b0c4a8c6f564d7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 16:20:06 -0800 Subject: [PATCH 15/28] chore: Re-generated to pick up changes from synthtool. (#315) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/fb5ed929-07a6-4b9c-9c01-20c1d4125a75/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/692715c0f23a7bb3bfbbaa300f7620ddfa8c47e5 Source-Link: https://github.com/googleapis/synthtool/commit/27b2d4f4674840628d0b75c5941e89c12af4764f --- .kokoro/release/publish_javadoc11.cfg | 4 ++-- LICENSE | 1 - synth.metadata | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg index 2ddd71ce..cd5cf29a 100644 --- a/.kokoro/release/publish_javadoc11.cfg +++ b/.kokoro/release/publish_javadoc11.cfg @@ -14,7 +14,7 @@ env_vars: { env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-memcache/.kokoro/release/publish_javadoc11.sh" + value: "github/java-bigqueryreservation/.kokoro/release/publish_javadoc11.sh" } before_action { @@ -27,4 +27,4 @@ before_action { } # Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/LICENSE b/LICENSE index d6456956..261eeb9e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/synth.metadata b/synth.metadata index 2b3cc035..1c3bb5b3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "3bf6cc2af09041d8f54d335b530b648ac2c57525" + "sha": "03d320160a8525cccb964b2845d5373abaff07bc" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "140ba24a136c63e7f10a998a63e7898aed63ea7d" + "sha": "692715c0f23a7bb3bfbbaa300f7620ddfa8c47e5" } } ], From 2906ada0df29eb094c214fd3767efe381a571406 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Feb 2021 08:44:42 -0800 Subject: [PATCH 16/28] feat: generate sample code in the Java microgenerator (#316) Committer: @miraleung PiperOrigin-RevId: 356341083 Source-Author: Google APIs Source-Date: Mon Feb 8 13:33:28 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: 8d8c008e56f1af31d57f75561e0f1848ffb29eeb Source-Link: https://github.com/googleapis/googleapis/commit/8d8c008e56f1af31d57f75561e0f1848ffb29eeb --- .../v1/ReservationServiceClient.java | 1064 +++++++++++++++++ .../bigquery/reservation/v1/package-info.java | 10 + synth.metadata | 6 +- 3 files changed, 1077 insertions(+), 3 deletions(-) diff --git a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java index 08e2055b..32a9d221 100644 --- a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java +++ b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java @@ -55,6 +55,16 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Reservation reservation = Reservation.newBuilder().build();
+ *   String reservationId = "reservationId1116965383";
+ *   Reservation response =
+ *       reservationServiceClient.createReservation(parent, reservation, reservationId);
+ * }
+ * }
+ * *

Note: close() needs to be called on the ReservationServiceClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -161,6 +171,18 @@ public ReservationServiceStub getStub() { /** * Creates a new reservation resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Reservation reservation = Reservation.newBuilder().build();
+   *   String reservationId = "reservationId1116965383";
+   *   Reservation response =
+   *       reservationServiceClient.createReservation(parent, reservation, reservationId);
+   * }
+   * }
+ * * @param parent Required. Project, location. E.g., `projects/myproject/locations/US` * @param reservation Definition of the new reservation to create. * @param reservationId The reservation ID. This field must only contain lower case alphanumeric @@ -182,6 +204,18 @@ public final Reservation createReservation( /** * Creates a new reservation resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
+   *   Reservation reservation = Reservation.newBuilder().build();
+   *   String reservationId = "reservationId1116965383";
+   *   Reservation response =
+   *       reservationServiceClient.createReservation(parent, reservation, reservationId);
+   * }
+   * }
+ * * @param parent Required. Project, location. E.g., `projects/myproject/locations/US` * @param reservation Definition of the new reservation to create. * @param reservationId The reservation ID. This field must only contain lower case alphanumeric @@ -203,6 +237,20 @@ public final Reservation createReservation( /** * Creates a new reservation resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateReservationRequest request =
+   *       CreateReservationRequest.newBuilder()
+   *           .setParent(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .setReservationId("reservationId1116965383")
+   *           .setReservation(Reservation.newBuilder().build())
+   *           .build();
+   *   Reservation response = reservationServiceClient.createReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -215,6 +263,21 @@ public final Reservation createReservation(CreateReservationRequest request) { * Creates a new reservation resource. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateReservationRequest request =
+   *       CreateReservationRequest.newBuilder()
+   *           .setParent(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .setReservationId("reservationId1116965383")
+   *           .setReservation(Reservation.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.createReservationCallable().futureCall(request);
+   *   // Do something.
+   *   Reservation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createReservationCallable() { return stub.createReservationCallable(); @@ -224,6 +287,17 @@ public final UnaryCallable createReservat /** * Lists all the reservations for the project in the specified location. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Reservation element : reservationServiceClient.listReservations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent resource name containing project and location, e.g.: * `projects/myproject/locations/US` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -240,6 +314,17 @@ public final ListReservationsPagedResponse listReservations(LocationName parent) /** * Lists all the reservations for the project in the specified location. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
+   *   for (Reservation element : reservationServiceClient.listReservations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent resource name containing project and location, e.g.: * `projects/myproject/locations/US` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -254,6 +339,22 @@ public final ListReservationsPagedResponse listReservations(String parent) { /** * Lists all the reservations for the project in the specified location. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListReservationsRequest request =
+   *       ListReservationsRequest.newBuilder()
+   *           .setParent(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Reservation element : reservationServiceClient.listReservations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -266,6 +367,23 @@ public final ListReservationsPagedResponse listReservations(ListReservationsRequ * Lists all the reservations for the project in the specified location. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListReservationsRequest request =
+   *       ListReservationsRequest.newBuilder()
+   *           .setParent(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.listReservationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Reservation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listReservationsPagedCallable() { @@ -277,6 +395,24 @@ public final ListReservationsPagedResponse listReservations(ListReservationsRequ * Lists all the reservations for the project in the specified location. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   while (true) {
+   *     ListReservationsResponse response =
+   *         reservationServiceClient.listReservationsCallable().call(request);
+   *     for (Reservation element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listReservationsCallable() { @@ -287,6 +423,15 @@ public final ListReservationsPagedResponse listReservations(ListReservationsRequ /** * Returns information about the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ReservationName name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   Reservation response = reservationServiceClient.getReservation(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the reservation to retrieve. E.g., * `projects/myproject/locations/US/reservations/team1-prod` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -301,6 +446,15 @@ public final Reservation getReservation(ReservationName name) { /** * Returns information about the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
+   *   Reservation response = reservationServiceClient.getReservation(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the reservation to retrieve. E.g., * `projects/myproject/locations/US/reservations/team1-prod` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -314,6 +468,18 @@ public final Reservation getReservation(String name) { /** * Returns information about the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetReservationRequest request =
+   *       GetReservationRequest.newBuilder()
+   *           .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .build();
+   *   Reservation response = reservationServiceClient.getReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -326,6 +492,19 @@ public final Reservation getReservation(GetReservationRequest request) { * Returns information about the reservation. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetReservationRequest request =
+   *       GetReservationRequest.newBuilder()
+   *           .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.getReservationCallable().futureCall(request);
+   *   // Do something.
+   *   Reservation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getReservationCallable() { return stub.getReservationCallable(); @@ -336,6 +515,15 @@ public final UnaryCallable getReservationCal * Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has * assignments. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ReservationName name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   reservationServiceClient.deleteReservation(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the reservation to retrieve. E.g., * `projects/myproject/locations/US/reservations/team1-prod` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -353,6 +541,15 @@ public final void deleteReservation(ReservationName name) { * Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has * assignments. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString();
+   *   reservationServiceClient.deleteReservation(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the reservation to retrieve. E.g., * `projects/myproject/locations/US/reservations/team1-prod` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -367,6 +564,18 @@ public final void deleteReservation(String name) { * Deletes a reservation. Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has * assignments. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteReservationRequest request =
+   *       DeleteReservationRequest.newBuilder()
+   *           .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .build();
+   *   reservationServiceClient.deleteReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -380,6 +589,19 @@ public final void deleteReservation(DeleteReservationRequest request) { * assignments. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteReservationRequest request =
+   *       DeleteReservationRequest.newBuilder()
+   *           .setName(ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.deleteReservationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteReservationCallable() { return stub.deleteReservationCallable(); @@ -389,6 +611,16 @@ public final UnaryCallable deleteReservationCal /** * Updates an existing reservation resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   Reservation reservation = Reservation.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Reservation response = reservationServiceClient.updateReservation(reservation, updateMask);
+   * }
+   * }
+ * * @param reservation Content of the reservation to update. * @param updateMask Standard field mask for the set of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -406,6 +638,19 @@ public final Reservation updateReservation(Reservation reservation, FieldMask up /** * Updates an existing reservation resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateReservationRequest request =
+   *       UpdateReservationRequest.newBuilder()
+   *           .setReservation(Reservation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Reservation response = reservationServiceClient.updateReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -418,6 +663,20 @@ public final Reservation updateReservation(UpdateReservationRequest request) { * Updates an existing reservation resource. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateReservationRequest request =
+   *       UpdateReservationRequest.newBuilder()
+   *           .setReservation(Reservation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.updateReservationCallable().futureCall(request);
+   *   // Do something.
+   *   Reservation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateReservationCallable() { return stub.updateReservationCallable(); @@ -427,6 +686,17 @@ public final UnaryCallable updateReservat /** * Creates a new capacity commitment resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   CapacityCommitment capacityCommitment = CapacityCommitment.newBuilder().build();
+   *   CapacityCommitment response =
+   *       reservationServiceClient.createCapacityCommitment(parent, capacityCommitment);
+   * }
+   * }
+ * * @param parent Required. Resource name of the parent reservation. E.g., * `projects/myproject/locations/US` * @param capacityCommitment Content of the capacity commitment to create. @@ -446,6 +716,18 @@ public final CapacityCommitment createCapacityCommitment( /** * Creates a new capacity commitment resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   CapacityCommitment capacityCommitment = CapacityCommitment.newBuilder().build();
+   *   CapacityCommitment response =
+   *       reservationServiceClient.createCapacityCommitment(parent, capacityCommitment);
+   * }
+   * }
+ * * @param parent Required. Resource name of the parent reservation. E.g., * `projects/myproject/locations/US` * @param capacityCommitment Content of the capacity commitment to create. @@ -465,6 +747,22 @@ public final CapacityCommitment createCapacityCommitment( /** * Creates a new capacity commitment resource. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateCapacityCommitmentRequest request =
+   *       CreateCapacityCommitmentRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setCapacityCommitment(CapacityCommitment.newBuilder().build())
+   *           .setEnforceSingleAdminProjectPerOrg(true)
+   *           .build();
+   *   CapacityCommitment response = reservationServiceClient.createCapacityCommitment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -478,6 +776,23 @@ public final CapacityCommitment createCapacityCommitment( * Creates a new capacity commitment resource. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateCapacityCommitmentRequest request =
+   *       CreateCapacityCommitmentRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setCapacityCommitment(CapacityCommitment.newBuilder().build())
+   *           .setEnforceSingleAdminProjectPerOrg(true)
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.createCapacityCommitmentCallable().futureCall(request);
+   *   // Do something.
+   *   CapacityCommitment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createCapacityCommitmentCallable() { @@ -488,6 +803,18 @@ public final CapacityCommitment createCapacityCommitment( /** * Lists all the capacity commitments for the admin project. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (CapacityCommitment element :
+   *       reservationServiceClient.listCapacityCommitments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Resource name of the parent reservation. E.g., * `projects/myproject/locations/US` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -504,6 +831,19 @@ public final ListCapacityCommitmentsPagedResponse listCapacityCommitments(Locati /** * Lists all the capacity commitments for the admin project. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   for (CapacityCommitment element :
+   *       reservationServiceClient.listCapacityCommitments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Resource name of the parent reservation. E.g., * `projects/myproject/locations/US` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -518,6 +858,25 @@ public final ListCapacityCommitmentsPagedResponse listCapacityCommitments(String /** * Lists all the capacity commitments for the admin project. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListCapacityCommitmentsRequest request =
+   *       ListCapacityCommitmentsRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (CapacityCommitment element :
+   *       reservationServiceClient.listCapacityCommitments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -531,6 +890,25 @@ public final ListCapacityCommitmentsPagedResponse listCapacityCommitments( * Lists all the capacity commitments for the admin project. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListCapacityCommitmentsRequest request =
+   *       ListCapacityCommitmentsRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.listCapacityCommitmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (CapacityCommitment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listCapacityCommitmentsPagedCallable() { @@ -542,6 +920,24 @@ public final ListCapacityCommitmentsPagedResponse listCapacityCommitments( * Lists all the capacity commitments for the admin project. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   while (true) {
+   *     ListCapacityCommitmentsResponse response =
+   *         reservationServiceClient.listCapacityCommitmentsCallable().call(request);
+   *     for (CapacityCommitment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listCapacityCommitmentsCallable() { @@ -552,6 +948,16 @@ public final ListCapacityCommitmentsPagedResponse listCapacityCommitments( /** * Returns information about the capacity commitment. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CapacityCommitmentName name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
+   *   CapacityCommitment response = reservationServiceClient.getCapacityCommitment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the capacity commitment to retrieve. E.g., * `projects/myproject/locations/US/capacityCommitments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -568,6 +974,16 @@ public final CapacityCommitment getCapacityCommitment(CapacityCommitmentName nam /** * Returns information about the capacity commitment. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   CapacityCommitment response = reservationServiceClient.getCapacityCommitment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the capacity commitment to retrieve. E.g., * `projects/myproject/locations/US/capacityCommitments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -582,6 +998,20 @@ public final CapacityCommitment getCapacityCommitment(String name) { /** * Returns information about the capacity commitment. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetCapacityCommitmentRequest request =
+   *       GetCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .build();
+   *   CapacityCommitment response = reservationServiceClient.getCapacityCommitment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -594,6 +1024,21 @@ public final CapacityCommitment getCapacityCommitment(GetCapacityCommitmentReque * Returns information about the capacity commitment. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetCapacityCommitmentRequest request =
+   *       GetCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.getCapacityCommitmentCallable().futureCall(request);
+   *   // Do something.
+   *   CapacityCommitment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getCapacityCommitmentCallable() { @@ -605,6 +1050,16 @@ public final CapacityCommitment getCapacityCommitment(GetCapacityCommitmentReque * Deletes a capacity commitment. Attempting to delete capacity commitment before its * commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CapacityCommitmentName name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
+   *   reservationServiceClient.deleteCapacityCommitment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the capacity commitment to delete. E.g., * `projects/myproject/locations/US/capacityCommitments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -622,6 +1077,16 @@ public final void deleteCapacityCommitment(CapacityCommitmentName name) { * Deletes a capacity commitment. Attempting to delete capacity commitment before its * commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   reservationServiceClient.deleteCapacityCommitment(name);
+   * }
+   * }
+ * * @param name Required. Resource name of the capacity commitment to delete. E.g., * `projects/myproject/locations/US/capacityCommitments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -637,6 +1102,20 @@ public final void deleteCapacityCommitment(String name) { * Deletes a capacity commitment. Attempting to delete capacity commitment before its * commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteCapacityCommitmentRequest request =
+   *       DeleteCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .build();
+   *   reservationServiceClient.deleteCapacityCommitment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -650,6 +1129,21 @@ public final void deleteCapacityCommitment(DeleteCapacityCommitmentRequest reque * commitment_end_time will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteCapacityCommitmentRequest request =
+   *       DeleteCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.deleteCapacityCommitmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteCapacityCommitmentCallable() { @@ -666,6 +1160,17 @@ public final void deleteCapacityCommitment(DeleteCapacityCommitmentRequest reque * plan with shorter commitment period will fail with the error code * `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CapacityCommitment capacityCommitment = CapacityCommitment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   CapacityCommitment response =
+   *       reservationServiceClient.updateCapacityCommitment(capacityCommitment, updateMask);
+   * }
+   * }
+ * * @param capacityCommitment Content of the capacity commitment to update. * @param updateMask Standard field mask for the set of fields to be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -690,6 +1195,19 @@ public final CapacityCommitment updateCapacityCommitment( * plan with shorter commitment period will fail with the error code * `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateCapacityCommitmentRequest request =
+   *       UpdateCapacityCommitmentRequest.newBuilder()
+   *           .setCapacityCommitment(CapacityCommitment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   CapacityCommitment response = reservationServiceClient.updateCapacityCommitment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -709,6 +1227,20 @@ public final CapacityCommitment updateCapacityCommitment( * `google.rpc.Code.FAILED_PRECONDITION`. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateCapacityCommitmentRequest request =
+   *       UpdateCapacityCommitmentRequest.newBuilder()
+   *           .setCapacityCommitment(CapacityCommitment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.updateCapacityCommitmentCallable().futureCall(request);
+   *   // Do something.
+   *   CapacityCommitment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateCapacityCommitmentCallable() { @@ -725,6 +1257,18 @@ public final CapacityCommitment updateCapacityCommitment( * capacity commitment into commitments of 2000 and 8000. Then, you would change the plan of the * first one to `FLEX` and then delete it. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CapacityCommitmentName name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]");
+   *   long slotCount = -191518834;
+   *   SplitCapacityCommitmentResponse response =
+   *       reservationServiceClient.splitCapacityCommitment(name, slotCount);
+   * }
+   * }
+ * * @param name Required. The resource name e.g.,: * `projects/myproject/locations/US/capacityCommitments/123` * @param slotCount Number of slots in the capacity commitment after the split. @@ -750,6 +1294,18 @@ public final SplitCapacityCommitmentResponse splitCapacityCommitment( * capacity commitment into commitments of 2000 and 8000. Then, you would change the plan of the * first one to `FLEX` and then delete it. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   long slotCount = -191518834;
+   *   SplitCapacityCommitmentResponse response =
+   *       reservationServiceClient.splitCapacityCommitment(name, slotCount);
+   * }
+   * }
+ * * @param name Required. The resource name e.g.,: * `projects/myproject/locations/US/capacityCommitments/123` * @param slotCount Number of slots in the capacity commitment after the split. @@ -772,6 +1328,22 @@ public final SplitCapacityCommitmentResponse splitCapacityCommitment( * capacity commitment into commitments of 2000 and 8000. Then, you would change the plan of the * first one to `FLEX` and then delete it. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   SplitCapacityCommitmentRequest request =
+   *       SplitCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setSlotCount(-191518834)
+   *           .build();
+   *   SplitCapacityCommitmentResponse response =
+   *       reservationServiceClient.splitCapacityCommitment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -791,6 +1363,22 @@ public final SplitCapacityCommitmentResponse splitCapacityCommitment( * first one to `FLEX` and then delete it. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   SplitCapacityCommitmentRequest request =
+   *       SplitCapacityCommitmentRequest.newBuilder()
+   *           .setName(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .setSlotCount(-191518834)
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.splitCapacityCommitmentCallable().futureCall(request);
+   *   // Do something.
+   *   SplitCapacityCommitmentResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable splitCapacityCommitmentCallable() { @@ -807,6 +1395,17 @@ public final SplitCapacityCommitmentResponse splitCapacityCommitment( *

Attempting to merge capacity commitments of different plan will fail with the error code * `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   List capacityCommitmentIds = new ArrayList<>();
+   *   CapacityCommitment response =
+   *       reservationServiceClient.mergeCapacityCommitments(parent, capacityCommitmentIds);
+   * }
+   * }
+ * * @param parent Parent resource that identifies admin project and location e.g., * `projects/myproject/locations/us` * @param capacityCommitmentIds Ids of capacity commitments to merge. These capacity commitments @@ -835,6 +1434,18 @@ public final CapacityCommitment mergeCapacityCommitments( *

Attempting to merge capacity commitments of different plan will fail with the error code * `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent =
+   *       CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]").toString();
+   *   List capacityCommitmentIds = new ArrayList<>();
+   *   CapacityCommitment response =
+   *       reservationServiceClient.mergeCapacityCommitments(parent, capacityCommitmentIds);
+   * }
+   * }
+ * * @param parent Parent resource that identifies admin project and location e.g., * `projects/myproject/locations/us` * @param capacityCommitmentIds Ids of capacity commitments to merge. These capacity commitments @@ -863,6 +1474,21 @@ public final CapacityCommitment mergeCapacityCommitments( *

Attempting to merge capacity commitments of different plan will fail with the error code * `google.rpc.Code.FAILED_PRECONDITION`. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   MergeCapacityCommitmentsRequest request =
+   *       MergeCapacityCommitmentsRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .addAllCapacityCommitmentIds(new ArrayList())
+   *           .build();
+   *   CapacityCommitment response = reservationServiceClient.mergeCapacityCommitments(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -882,6 +1508,22 @@ public final CapacityCommitment mergeCapacityCommitments( * `google.rpc.Code.FAILED_PRECONDITION`. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   MergeCapacityCommitmentsRequest request =
+   *       MergeCapacityCommitmentsRequest.newBuilder()
+   *           .setParent(
+   *               CapacityCommitmentName.of("[PROJECT]", "[LOCATION]", "[CAPACITY_COMMITMENT]")
+   *                   .toString())
+   *           .addAllCapacityCommitmentIds(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.mergeCapacityCommitmentsCallable().futureCall(request);
+   *   // Do something.
+   *   CapacityCommitment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable mergeCapacityCommitmentsCallable() { @@ -918,6 +1560,16 @@ public final CapacityCommitment mergeCapacityCommitments( *

Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match * location of the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ReservationName parent = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   Assignment assignment = Assignment.newBuilder().build();
+   *   Assignment response = reservationServiceClient.createAssignment(parent, assignment);
+   * }
+   * }
+ * * @param parent Required. The parent resource name of the assignment E.g. * `projects/myproject/locations/US/reservations/team1-prod` * @param assignment Assignment resource to create. @@ -962,6 +1614,17 @@ public final Assignment createAssignment(ReservationName parent, Assignment assi *

Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match * location of the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   Assignment assignment = Assignment.newBuilder().build();
+   *   Assignment response = reservationServiceClient.createAssignment(parent, assignment);
+   * }
+   * }
+ * * @param parent Required. The parent resource name of the assignment E.g. * `projects/myproject/locations/US/reservations/team1-prod` * @param assignment Assignment resource to create. @@ -1003,6 +1666,21 @@ public final Assignment createAssignment(String parent, Assignment assignment) { *

Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment does not match * location of the reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateAssignmentRequest request =
+   *       CreateAssignmentRequest.newBuilder()
+   *           .setParent(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setAssignment(Assignment.newBuilder().build())
+   *           .build();
+   *   Assignment response = reservationServiceClient.createAssignment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1041,6 +1719,22 @@ public final Assignment createAssignment(CreateAssignmentRequest request) { * location of the reservation. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   CreateAssignmentRequest request =
+   *       CreateAssignmentRequest.newBuilder()
+   *           .setParent(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setAssignment(Assignment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.createAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   Assignment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createAssignmentCallable() { return stub.createAssignmentCallable(); @@ -1069,6 +1763,17 @@ public final UnaryCallable createAssignment * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ReservationName parent = ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   for (Assignment element : reservationServiceClient.listAssignments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent resource name e.g.: *

`projects/myproject/locations/US/reservations/team1-prod` *

Or: @@ -1106,6 +1811,18 @@ public final ListAssignmentsPagedResponse listAssignments(ReservationName parent * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   for (Assignment element : reservationServiceClient.listAssignments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The parent resource name e.g.: *

`projects/myproject/locations/US/reservations/team1-prod` *

Or: @@ -1140,6 +1857,24 @@ public final ListAssignmentsPagedResponse listAssignments(String parent) { * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListAssignmentsRequest request =
+   *       ListAssignmentsRequest.newBuilder()
+   *           .setParent(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Assignment element : reservationServiceClient.listAssignments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1171,6 +1906,25 @@ public final ListAssignmentsPagedResponse listAssignments(ListAssignmentsRequest *

**Note** "-" cannot be used for projects nor locations. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   ListAssignmentsRequest request =
+   *       ListAssignmentsRequest.newBuilder()
+   *           .setParent(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.listAssignmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Assignment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAssignmentsPagedCallable() { @@ -1201,6 +1955,24 @@ public final ListAssignmentsPagedResponse listAssignments(ListAssignmentsRequest *

**Note** "-" cannot be used for projects nor locations. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   while (true) {
+   *     ListAssignmentsResponse response =
+   *         reservationServiceClient.listAssignmentsCallable().call(request);
+   *     for (Assignment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAssignmentsCallable() { @@ -1224,6 +1996,16 @@ public final ListAssignmentsPagedResponse listAssignments(ListAssignmentsRequest * other assignment `<project1, res1>`. After said deletion, queries from `project1` will * still use `res1` while queries from `project2` will switch to use on-demand mode. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   AssignmentName name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
+   *   reservationServiceClient.deleteAssignment(name);
+   * }
+   * }
+ * * @param name Required. Name of the resource, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1251,6 +2033,16 @@ public final void deleteAssignment(AssignmentName name) { * other assignment `<project1, res1>`. After said deletion, queries from `project1` will * still use `res1` while queries from `project2` will switch to use on-demand mode. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   reservationServiceClient.deleteAssignment(name);
+   * }
+   * }
+ * * @param name Required. Name of the resource, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1277,6 +2069,20 @@ public final void deleteAssignment(String name) { * other assignment `<project1, res1>`. After said deletion, queries from `project1` will * still use `res1` while queries from `project2` will switch to use on-demand mode. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteAssignmentRequest request =
+   *       DeleteAssignmentRequest.newBuilder()
+   *           .setName(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   reservationServiceClient.deleteAssignment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1302,6 +2108,21 @@ public final void deleteAssignment(DeleteAssignmentRequest request) { * still use `res1` while queries from `project2` will switch to use on-demand mode. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   DeleteAssignmentRequest request =
+   *       DeleteAssignmentRequest.newBuilder()
+   *           .setName(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.deleteAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteAssignmentCallable() { return stub.deleteAssignmentCallable(); @@ -1330,6 +2151,19 @@ public final UnaryCallable deleteAssignmentCalla * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String query = "query107944136";
+   *   for (Assignment element :
+   *       reservationServiceClient.searchAssignments(parent, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The resource name of the admin project(containing project and * location), e.g.: `projects/myproject/locations/US`. * @param query Please specify resource name as assignee in the query. @@ -1374,6 +2208,19 @@ public final SearchAssignmentsPagedResponse searchAssignments(LocationName paren * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String query = "query107944136";
+   *   for (Assignment element :
+   *       reservationServiceClient.searchAssignments(parent, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The resource name of the admin project(containing project and * location), e.g.: `projects/myproject/locations/US`. * @param query Please specify resource name as assignee in the query. @@ -1415,6 +2262,23 @@ public final SearchAssignmentsPagedResponse searchAssignments(String parent, Str * *

**Note** "-" cannot be used for projects nor locations. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   SearchAssignmentsRequest request =
+   *       SearchAssignmentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Assignment element : reservationServiceClient.searchAssignments(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1446,6 +2310,24 @@ public final SearchAssignmentsPagedResponse searchAssignments(SearchAssignmentsR *

**Note** "-" cannot be used for projects nor locations. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   SearchAssignmentsRequest request =
+   *       SearchAssignmentsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.searchAssignmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Assignment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable searchAssignmentsPagedCallable() { @@ -1476,6 +2358,24 @@ public final SearchAssignmentsPagedResponse searchAssignments(SearchAssignmentsR *

**Note** "-" cannot be used for projects nor locations. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   while (true) {
+   *     SearchAssignmentsResponse response =
+   *         reservationServiceClient.searchAssignmentsCallable().call(request);
+   *     for (Assignment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable searchAssignmentsCallable() { @@ -1489,6 +2389,18 @@ public final SearchAssignmentsPagedResponse searchAssignments(SearchAssignmentsR *

This differs from removing an existing assignment and recreating a new one by providing a * transactional change that ensures an assignee always has an associated reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   AssignmentName name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
+   *   ReservationName destinationId =
+   *       ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   Assignment response = reservationServiceClient.moveAssignment(name, destinationId);
+   * }
+   * }
+ * * @param name Required. The resource name of the assignment, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @param destinationId The new reservation ID, e.g.: @@ -1511,6 +2423,18 @@ public final Assignment moveAssignment(AssignmentName name, ReservationName dest *

This differs from removing an existing assignment and recreating a new one by providing a * transactional change that ensures an assignee always has an associated reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   AssignmentName name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]");
+   *   String destinationId =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   Assignment response = reservationServiceClient.moveAssignment(name, destinationId);
+   * }
+   * }
+ * * @param name Required. The resource name of the assignment, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @param destinationId The new reservation ID, e.g.: @@ -1533,6 +2457,18 @@ public final Assignment moveAssignment(AssignmentName name, String destinationId *

This differs from removing an existing assignment and recreating a new one by providing a * transactional change that ensures an assignee always has an associated reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   ReservationName destinationId =
+   *       ReservationName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]");
+   *   Assignment response = reservationServiceClient.moveAssignment(name, destinationId);
+   * }
+   * }
+ * * @param name Required. The resource name of the assignment, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @param destinationId The new reservation ID, e.g.: @@ -1555,6 +2491,18 @@ public final Assignment moveAssignment(String name, ReservationName destinationI *

This differs from removing an existing assignment and recreating a new one by providing a * transactional change that ensures an assignee always has an associated reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   String destinationId =
+   *       AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]").toString();
+   *   Assignment response = reservationServiceClient.moveAssignment(name, destinationId);
+   * }
+   * }
+ * * @param name Required. The resource name of the assignment, e.g. * `projects/myproject/locations/US/reservations/team1-prod/assignments/123` * @param destinationId The new reservation ID, e.g.: @@ -1574,6 +2522,23 @@ public final Assignment moveAssignment(String name, String destinationId) { *

This differs from removing an existing assignment and recreating a new one by providing a * transactional change that ensures an assignee always has an associated reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   MoveAssignmentRequest request =
+   *       MoveAssignmentRequest.newBuilder()
+   *           .setName(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setDestinationId(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   Assignment response = reservationServiceClient.moveAssignment(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1589,6 +2554,24 @@ public final Assignment moveAssignment(MoveAssignmentRequest request) { * transactional change that ensures an assignee always has an associated reservation. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   MoveAssignmentRequest request =
+   *       MoveAssignmentRequest.newBuilder()
+   *           .setName(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .setDestinationId(
+   *               AssignmentName.of("[PROJECT]", "[LOCATION]", "[RESERVATION]", "[ASSIGNMENT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.moveAssignmentCallable().futureCall(request);
+   *   // Do something.
+   *   Assignment response = future.get();
+   * }
+   * }
*/ public final UnaryCallable moveAssignmentCallable() { return stub.moveAssignmentCallable(); @@ -1598,6 +2581,15 @@ public final UnaryCallable moveAssignmentCall /** * Retrieves a BI reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   BiReservationName name = BiReservationName.of("[PROJECT]", "[LOCATION]");
+   *   BiReservation response = reservationServiceClient.getBiReservation(name);
+   * }
+   * }
+ * * @param name Required. Name of the requested reservation, for example: * `projects/{project_id}/locations/{location_id}/bireservation` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1612,6 +2604,15 @@ public final BiReservation getBiReservation(BiReservationName name) { /** * Retrieves a BI reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   String name = BiReservationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   BiReservation response = reservationServiceClient.getBiReservation(name);
+   * }
+   * }
+ * * @param name Required. Name of the requested reservation, for example: * `projects/{project_id}/locations/{location_id}/bireservation` * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1625,6 +2626,18 @@ public final BiReservation getBiReservation(String name) { /** * Retrieves a BI reservation. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetBiReservationRequest request =
+   *       GetBiReservationRequest.newBuilder()
+   *           .setName(BiReservationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   BiReservation response = reservationServiceClient.getBiReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1637,6 +2650,19 @@ public final BiReservation getBiReservation(GetBiReservationRequest request) { * Retrieves a BI reservation. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   GetBiReservationRequest request =
+   *       GetBiReservationRequest.newBuilder()
+   *           .setName(BiReservationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.getBiReservationCallable().futureCall(request);
+   *   // Do something.
+   *   BiReservation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getBiReservationCallable() { return stub.getBiReservationCallable(); @@ -1652,6 +2678,17 @@ public final UnaryCallable getBiReservat * capacity it needs to be updated to an amount greater than 0. In order to release BI capacity * reservation size must be set to 0. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   BiReservation biReservation = BiReservation.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   BiReservation response =
+   *       reservationServiceClient.updateBiReservation(biReservation, updateMask);
+   * }
+   * }
+ * * @param biReservation A reservation to update. * @param updateMask A list of fields to be updated in this request. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1676,6 +2713,19 @@ public final BiReservation updateBiReservation( * capacity it needs to be updated to an amount greater than 0. In order to release BI capacity * reservation size must be set to 0. * + *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateBiReservationRequest request =
+   *       UpdateBiReservationRequest.newBuilder()
+   *           .setBiReservation(BiReservation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   BiReservation response = reservationServiceClient.updateBiReservation(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1694,6 +2744,20 @@ public final BiReservation updateBiReservation(UpdateBiReservationRequest reques * reservation size must be set to 0. * *

Sample code: + * + *

{@code
+   * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+   *   UpdateBiReservationRequest request =
+   *       UpdateBiReservationRequest.newBuilder()
+   *           .setBiReservation(BiReservation.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       reservationServiceClient.updateBiReservationCallable().futureCall(request);
+   *   // Do something.
+   *   BiReservation response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateBiReservationCallable() { diff --git a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/package-info.java b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/package-info.java index 68370de0..99d3295f 100644 --- a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/package-info.java +++ b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/package-info.java @@ -34,6 +34,16 @@ * `projects/myproject/locations/US/capacityCommitments/id`. * *

Sample for ReservationServiceClient: + * + *

{@code
+ * try (ReservationServiceClient reservationServiceClient = ReservationServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   Reservation reservation = Reservation.newBuilder().build();
+ *   String reservationId = "reservationId1116965383";
+ *   Reservation response =
+ *       reservationServiceClient.createReservation(parent, reservation, reservationId);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.bigquery.reservation.v1; diff --git a/synth.metadata b/synth.metadata index 1c3bb5b3..81adcf19 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "03d320160a8525cccb964b2845d5373abaff07bc" + "sha": "624c7890b9d2e6c4ea526ad909b0c4a8c6f564d7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, { From bcbc8c6dfe35714844395cbb690b4d6792ad11f3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Feb 2021 21:08:57 +0100 Subject: [PATCH 17/28] chore(deps): update dependency com.google.cloud:libraries-bom to v16.4.0 (#317) --- 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 03d94a5e..764078bb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.3.0 + 16.4.0 pom import From b49d92f55f3ff3ab2e3aa2192216a16aa731b9cb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 10 Feb 2021 08:41:09 -0800 Subject: [PATCH 18/28] build(java): update autorelease script (#318) Noticed the workflow was getting skipped on all the release PRs. Updating due to recent update in release-please branch name. Source-Author: Stephanie Wang Source-Date: Tue Feb 9 19:10:03 2021 -0500 Source-Repo: googleapis/synthtool Source-Sha: 2414b817065726eae0bc525346c7e874f969369d Source-Link: https://github.com/googleapis/synthtool/commit/2414b817065726eae0bc525346c7e874f969369d --- .github/workflows/auto-release.yaml | 4 ++-- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 76e6404b..7c8816a7 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,7 +16,7 @@ jobs: return; } - // only approve PRs like "chore: release " + // only approve PRs like "chore(master): release " if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/synth.metadata b/synth.metadata index 81adcf19..61866cd5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "624c7890b9d2e6c4ea526ad909b0c4a8c6f564d7" + "sha": "bcbc8c6dfe35714844395cbb690b4d6792ad11f3" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "692715c0f23a7bb3bfbbaa300f7620ddfa8c47e5" + "sha": "2414b817065726eae0bc525346c7e874f969369d" } } ], From 7b1c23f542ce4b0bd43c23c498a8edf30647189a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Feb 2021 18:04:59 +0100 Subject: [PATCH 19/28] test(deps): update dependency junit:junit to v4.13.2 (#319) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index f107b544..1376eb4d 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ junit junit - 4.13.1 + 4.13.2 test
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 833a819d..66f1485e 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -36,7 +36,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 51ba8df3..f4d33de9 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -34,7 +34,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 764078bb..61794d64 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -48,7 +48,7 @@ junit junit - 4.13.1 + 4.13.2 test From b482a3ea4a74674795cda42eedacc861ea0750f0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 16 Feb 2021 16:20:35 -0800 Subject: [PATCH 20/28] ci: linkage monitor CI job to use build.sh (#321) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b8610420-a21c-46af-bf29-2bd1f66ab680/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/f327d3b657a63ae4a8efd7f011a15eacae36b59c --- .github/workflows/ci.yaml | 13 +++---------- synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98a472e1..def8b3a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,17 +55,10 @@ jobs: java-version: 8 - run: java -version - name: Install artifacts to local Maven repository - run: | - source .kokoro/common.sh - retry_with_backoff 3 10 \ - mvn install -B -V \ - -Dmaven.test.skip -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true + run: .kokoro/build.sh shell: bash - - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/synth.metadata b/synth.metadata index 61866cd5..deaed234 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "bcbc8c6dfe35714844395cbb690b4d6792ad11f3" + "sha": "7b1c23f542ce4b0bd43c23c498a8edf30647189a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "2414b817065726eae0bc525346c7e874f969369d" + "sha": "f327d3b657a63ae4a8efd7f011a15eacae36b59c" } } ], From 8d5112d104f211c3cbdec9d2dc7f2890635a91bb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 Feb 2021 07:45:04 -0800 Subject: [PATCH 21/28] chore: update gapic-generator-java to 0.0.20 (#320) Committer: @miraleung PiperOrigin-RevId: 357800868 Source-Author: Google APIs Source-Date: Tue Feb 16 14:06:04 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: e8bc4471a88ac5f60defe3ed436f517174e59ba0 Source-Link: https://github.com/googleapis/googleapis/commit/e8bc4471a88ac5f60defe3ed436f517174e59ba0 --- .../v1/stub/GrpcReservationServiceStub.java | 23 +++ .../v1/MockReservationServiceImpl.java | 152 +++++++++++++++--- synth.metadata | 4 +- 3 files changed, 158 insertions(+), 21 deletions(-) diff --git a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceStub.java b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceStub.java index c95be4f5..468a2ba3 100644 --- a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceStub.java +++ b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceStub.java @@ -747,106 +747,129 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable createReservationCallable() { return createReservationCallable; } + @Override public UnaryCallable listReservationsCallable() { return listReservationsCallable; } + @Override public UnaryCallable listReservationsPagedCallable() { return listReservationsPagedCallable; } + @Override public UnaryCallable getReservationCallable() { return getReservationCallable; } + @Override public UnaryCallable deleteReservationCallable() { return deleteReservationCallable; } + @Override public UnaryCallable updateReservationCallable() { return updateReservationCallable; } + @Override public UnaryCallable createCapacityCommitmentCallable() { return createCapacityCommitmentCallable; } + @Override public UnaryCallable listCapacityCommitmentsCallable() { return listCapacityCommitmentsCallable; } + @Override public UnaryCallable listCapacityCommitmentsPagedCallable() { return listCapacityCommitmentsPagedCallable; } + @Override public UnaryCallable getCapacityCommitmentCallable() { return getCapacityCommitmentCallable; } + @Override public UnaryCallable deleteCapacityCommitmentCallable() { return deleteCapacityCommitmentCallable; } + @Override public UnaryCallable updateCapacityCommitmentCallable() { return updateCapacityCommitmentCallable; } + @Override public UnaryCallable splitCapacityCommitmentCallable() { return splitCapacityCommitmentCallable; } + @Override public UnaryCallable mergeCapacityCommitmentsCallable() { return mergeCapacityCommitmentsCallable; } + @Override public UnaryCallable createAssignmentCallable() { return createAssignmentCallable; } + @Override public UnaryCallable listAssignmentsCallable() { return listAssignmentsCallable; } + @Override public UnaryCallable listAssignmentsPagedCallable() { return listAssignmentsPagedCallable; } + @Override public UnaryCallable deleteAssignmentCallable() { return deleteAssignmentCallable; } + @Override public UnaryCallable searchAssignmentsCallable() { return searchAssignmentsCallable; } + @Override public UnaryCallable searchAssignmentsPagedCallable() { return searchAssignmentsPagedCallable; } + @Override public UnaryCallable moveAssignmentCallable() { return moveAssignmentCallable; } + @Override public UnaryCallable getBiReservationCallable() { return getBiReservationCallable; } + @Override public UnaryCallable updateBiReservationCallable() { return updateBiReservationCallable; } diff --git a/google-cloud-bigqueryreservation/src/test/java/com/google/cloud/bigquery/reservation/v1/MockReservationServiceImpl.java b/google-cloud-bigqueryreservation/src/test/java/com/google/cloud/bigquery/reservation/v1/MockReservationServiceImpl.java index 9f2b73d0..60694fc5 100644 --- a/google-cloud-bigqueryreservation/src/test/java/com/google/cloud/bigquery/reservation/v1/MockReservationServiceImpl.java +++ b/google-cloud-bigqueryreservation/src/test/java/com/google/cloud/bigquery/reservation/v1/MockReservationServiceImpl.java @@ -70,7 +70,13 @@ public void createReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateReservation, expected %s or %s", + response.getClass().getName(), + Reservation.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void listReservations( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListReservations, expected %s or %s", + response.getClass().getName(), + ListReservationsResponse.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void getReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetReservation, expected %s or %s", + response.getClass().getName(), + Reservation.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void deleteReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteReservation, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void updateReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateReservation, expected %s or %s", + response.getClass().getName(), + Reservation.class.getName(), + Exception.class.getName()))); } } @@ -146,7 +176,13 @@ public void createCapacityCommitment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateCapacityCommitment, expected %s or %s", + response.getClass().getName(), + CapacityCommitment.class.getName(), + Exception.class.getName()))); } } @@ -162,7 +198,13 @@ public void listCapacityCommitments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCapacityCommitments, expected %s or %s", + response.getClass().getName(), + ListCapacityCommitmentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -177,7 +219,13 @@ public void getCapacityCommitment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCapacityCommitment, expected %s or %s", + response.getClass().getName(), + CapacityCommitment.class.getName(), + Exception.class.getName()))); } } @@ -192,7 +240,13 @@ public void deleteCapacityCommitment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCapacityCommitment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -208,7 +262,13 @@ public void updateCapacityCommitment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCapacityCommitment, expected %s or %s", + response.getClass().getName(), + CapacityCommitment.class.getName(), + Exception.class.getName()))); } } @@ -224,7 +284,13 @@ public void splitCapacityCommitment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SplitCapacityCommitment, expected %s or %s", + response.getClass().getName(), + SplitCapacityCommitmentResponse.class.getName(), + Exception.class.getName()))); } } @@ -240,7 +306,13 @@ public void mergeCapacityCommitments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method MergeCapacityCommitments, expected %s or %s", + response.getClass().getName(), + CapacityCommitment.class.getName(), + Exception.class.getName()))); } } @@ -255,7 +327,13 @@ public void createAssignment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAssignment, expected %s or %s", + response.getClass().getName(), + Assignment.class.getName(), + Exception.class.getName()))); } } @@ -270,7 +348,13 @@ public void listAssignments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssignments, expected %s or %s", + response.getClass().getName(), + ListAssignmentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -285,7 +369,13 @@ public void deleteAssignment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAssignment, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -301,7 +391,13 @@ public void searchAssignments( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SearchAssignments, expected %s or %s", + response.getClass().getName(), + SearchAssignmentsResponse.class.getName(), + Exception.class.getName()))); } } @@ -316,7 +412,13 @@ public void moveAssignment( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method MoveAssignment, expected %s or %s", + response.getClass().getName(), + Assignment.class.getName(), + Exception.class.getName()))); } } @@ -331,7 +433,13 @@ public void getBiReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetBiReservation, expected %s or %s", + response.getClass().getName(), + BiReservation.class.getName(), + Exception.class.getName()))); } } @@ -346,7 +454,13 @@ public void updateBiReservation( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateBiReservation, expected %s or %s", + response.getClass().getName(), + BiReservation.class.getName(), + Exception.class.getName()))); } } } diff --git a/synth.metadata b/synth.metadata index deaed234..c84f826a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", - "internalRef": "356341083" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, { From 71512f6497bbbbd5182b5c7166ceb99528cc33c4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 Feb 2021 07:45:19 -0800 Subject: [PATCH 22/28] chore: update cloud-rad buckets (#322) doclava v2 => staging docFX v3 => prod Source-Author: Emily Ball Source-Date: Tue Feb 16 17:02:08 2021 -0800 Source-Repo: googleapis/synthtool Source-Sha: b416a7befcdbc42de41cf387dcf428f894fb812b Source-Link: https://github.com/googleapis/synthtool/commit/b416a7befcdbc42de41cf387dcf428f894fb812b --- .kokoro/release/publish_javadoc.cfg | 4 ++-- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.cfg | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- synth.metadata | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 6bdad086..a8d69128 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index cd43b3aa..ae39e15b 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg index cd5cf29a..86b4c71b 100644 --- a/.kokoro/release/publish_javadoc11.cfg +++ b/.kokoro/release/publish_javadoc11.cfg @@ -1,9 +1,9 @@ # Format: //devtools/kokoro/config/proto/build.proto +# cloud-rad production env_vars: { key: "STAGING_BUCKET_V2" value: "docs-staging-v2" - # Production will be at: docs-staging-v2 } # Configure the docker image for kokoro-trampoline diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 9da1e5ef..4dd5c4c4 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -48,7 +48,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload yml +# upload yml to production bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} \ diff --git a/synth.metadata b/synth.metadata index c84f826a..62dd4b43 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "7b1c23f542ce4b0bd43c23c498a8edf30647189a" + "sha": "b482a3ea4a74674795cda42eedacc861ea0750f0" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f327d3b657a63ae4a8efd7f011a15eacae36b59c" + "sha": "b416a7befcdbc42de41cf387dcf428f894fb812b" } } ], From 39454f442c17e7f94ea62001763f367efc44ac4d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Feb 2021 16:40:25 -0800 Subject: [PATCH 23/28] build: skip Maven download logs (#323) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a6b7617f-b194-4419-a5c2-38ceb3c55e68/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1aeca92e4a38f47134cb955f52ea76f84f09ff88 --- .kokoro/build.sh | 2 ++ synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 6a7458d0..21bc3b6f 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -60,6 +60,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -81,6 +82,7 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ + -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ diff --git a/synth.metadata b/synth.metadata index 62dd4b43..ed4a6657 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "b482a3ea4a74674795cda42eedacc861ea0750f0" + "sha": "71512f6497bbbbd5182b5c7166ceb99528cc33c4" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b416a7befcdbc42de41cf387dcf428f894fb812b" + "sha": "1aeca92e4a38f47134cb955f52ea76f84f09ff88" } } ], From b4b0e4ea0d019ec365eb216f8b790917dc81a1f4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 19 Feb 2021 07:46:33 -0800 Subject: [PATCH 24/28] build: reduce download junk in log files (#324) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3fc7c8a6-fbba-4d19-9ef9-7d740e5ce776/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/6946fd71ae9215b0e7ae188f5057df765ee6d7d2 --- .kokoro/build.sh | 2 +- .kokoro/dependencies.sh | 4 ++-- synth.metadata | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 21bc3b6f..dce116e0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -29,7 +29,7 @@ echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true \ -Denforcer.skip=true \ diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a56..0fb8c843 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/synth.metadata b/synth.metadata index ed4a6657..d5b7ed33 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "71512f6497bbbbd5182b5c7166ceb99528cc33c4" + "sha": "39454f442c17e7f94ea62001763f367efc44ac4d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1aeca92e4a38f47134cb955f52ea76f84f09ff88" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], From eec8507eaacb9ec7a83933fe1e54d4a20b8aad65 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Feb 2021 22:50:55 +0100 Subject: [PATCH 25/28] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 (#325) [![WhiteSource 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) | `0.18.0` -> `0.19.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.19.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.19.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.19.0/compatibility-slim/0.18.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/0.19.0/confidence-slim/0.18.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v0.19.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​0190-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare0180v0190-2021-02-19) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v0.18.0...v0.19.0) ##### Bug Fixes - update repo name ([#​274](https://www.github.com/googleapis/java-shared-dependencies/issues/274)) ([4a98470](https://www.github.com/googleapis/java-shared-dependencies/commit/4a98470b7493c98137191b7bb3cabca23f98628f)) ##### Dependencies - downgrade opencensus version back to 0.28.0 ([#​265](https://www.github.com/googleapis/java-shared-dependencies/issues/265)) ([f37025c](https://www.github.com/googleapis/java-shared-dependencies/commit/f37025c70f951b1e34904ee983815c0ed8ec4086)) - update dependency com.google.api-client:google-api-client-bom to v1.31.2 ([#​254](https://www.github.com/googleapis/java-shared-dependencies/issues/254)) ([1b0b4a6](https://www.github.com/googleapis/java-shared-dependencies/commit/1b0b4a637cae0c22cd0336c527002025780317d5)) - update dependency com.google.auth:google-auth-library-bom to v0.23.0 ([#​261](https://www.github.com/googleapis/java-shared-dependencies/issues/261)) ([1c0b7bd](https://www.github.com/googleapis/java-shared-dependencies/commit/1c0b7bd60b3d73c16cc6c19ab90d8ccedece3706)) - update dependency com.google.cloud:google-cloud-core to v1.94.1 ([#​272](https://www.github.com/googleapis/java-shared-dependencies/issues/272)) ([44fd4c3](https://www.github.com/googleapis/java-shared-dependencies/commit/44fd4c3c6cae98bd514525f03462b830050828a8)) - update dependency com.google.errorprone:error_prone_annotations to v2.5.1 ([#​255](https://www.github.com/googleapis/java-shared-dependencies/issues/255)) ([6367023](https://www.github.com/googleapis/java-shared-dependencies/commit/63670233424e8f24c3924bba5e2cb6ca97525795)) - update dependency com.google.http-client:google-http-client-bom to v1.38.1 ([#​253](https://www.github.com/googleapis/java-shared-dependencies/issues/253)) ([ad87c74](https://www.github.com/googleapis/java-shared-dependencies/commit/ad87c74d9d893726042156d65850806d92e79952)) - update dependency com.google.protobuf:protobuf-bom to v3.15.0 ([#​278](https://www.github.com/googleapis/java-shared-dependencies/issues/278)) ([989efbd](https://www.github.com/googleapis/java-shared-dependencies/commit/989efbd29bcf4135f7abce49a697303df2cf1a60)) - update dependency io.grpc:grpc-bom to v1.35.0 ([#​248](https://www.github.com/googleapis/java-shared-dependencies/issues/248)) ([7a28c6e](https://www.github.com/googleapis/java-shared-dependencies/commit/7a28c6e7053c181993b1288adcae56de89312113)) - update gax.version to v1.61.0 ([#​277](https://www.github.com/googleapis/java-shared-dependencies/issues/277)) ([f1c3fb9](https://www.github.com/googleapis/java-shared-dependencies/commit/f1c3fb9295f2e1c130b9fc329faa60f4f8474ba6)) - update iam.version to v1.0.7 ([#​252](https://www.github.com/googleapis/java-shared-dependencies/issues/252)) ([5cb3ed9](https://www.github.com/googleapis/java-shared-dependencies/commit/5cb3ed906537269cd7f8d9ccf4b065754b5f5b48)) - update iam.version to v1.0.8 ([#​273](https://www.github.com/googleapis/java-shared-dependencies/issues/273)) ([4d5e7f7](https://www.github.com/googleapis/java-shared-dependencies/commit/4d5e7f720d847918b307a83c95cea10c244ba595))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigqueryreservation). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1376eb4d..0408c321 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.18.0 + 0.19.0 pom import From dae474e954c7dacdb364dab005222bc861ac11ed Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 22 Feb 2021 09:04:07 -0800 Subject: [PATCH 26/28] chore: release gapic-generator-java v0.0.21 with gapic_metadata.json support (#326) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4e021054-20b0-4422-bf03-10291684f63d/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 358516065 Source-Link: https://github.com/googleapis/googleapis/commit/af8f71dae961ee036a0ac52a1965270149a6b2c9 --- .../reservation/v1/gapic_metadata.json | 75 +++++++++++++++++++ synth.metadata | 7 +- 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/gapic_metadata.json diff --git a/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/gapic_metadata.json b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/gapic_metadata.json new file mode 100644 index 00000000..345ab1be --- /dev/null +++ b/google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/gapic_metadata.json @@ -0,0 +1,75 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.bigquery.reservation.v1", + "libraryPackage": "com.google.cloud.bigquery.reservation.v1", + "services": { + "ReservationService": { + "clients": { + "grpc": { + "libraryClient": "ReservationServiceClient", + "rpcs": { + "CreateAssignment": { + "methods": ["createAssignment", "createAssignment", "createAssignment", "createAssignmentCallable"] + }, + "CreateCapacityCommitment": { + "methods": ["createCapacityCommitment", "createCapacityCommitment", "createCapacityCommitment", "createCapacityCommitmentCallable"] + }, + "CreateReservation": { + "methods": ["createReservation", "createReservation", "createReservation", "createReservationCallable"] + }, + "DeleteAssignment": { + "methods": ["deleteAssignment", "deleteAssignment", "deleteAssignment", "deleteAssignmentCallable"] + }, + "DeleteCapacityCommitment": { + "methods": ["deleteCapacityCommitment", "deleteCapacityCommitment", "deleteCapacityCommitment", "deleteCapacityCommitmentCallable"] + }, + "DeleteReservation": { + "methods": ["deleteReservation", "deleteReservation", "deleteReservation", "deleteReservationCallable"] + }, + "GetBiReservation": { + "methods": ["getBiReservation", "getBiReservation", "getBiReservation", "getBiReservationCallable"] + }, + "GetCapacityCommitment": { + "methods": ["getCapacityCommitment", "getCapacityCommitment", "getCapacityCommitment", "getCapacityCommitmentCallable"] + }, + "GetReservation": { + "methods": ["getReservation", "getReservation", "getReservation", "getReservationCallable"] + }, + "ListAssignments": { + "methods": ["listAssignments", "listAssignments", "listAssignments", "listAssignmentsPagedCallable", "listAssignmentsCallable"] + }, + "ListCapacityCommitments": { + "methods": ["listCapacityCommitments", "listCapacityCommitments", "listCapacityCommitments", "listCapacityCommitmentsPagedCallable", "listCapacityCommitmentsCallable"] + }, + "ListReservations": { + "methods": ["listReservations", "listReservations", "listReservations", "listReservationsPagedCallable", "listReservationsCallable"] + }, + "MergeCapacityCommitments": { + "methods": ["mergeCapacityCommitments", "mergeCapacityCommitments", "mergeCapacityCommitments", "mergeCapacityCommitmentsCallable"] + }, + "MoveAssignment": { + "methods": ["moveAssignment", "moveAssignment", "moveAssignment", "moveAssignment", "moveAssignment", "moveAssignmentCallable"] + }, + "SearchAssignments": { + "methods": ["searchAssignments", "searchAssignments", "searchAssignments", "searchAssignmentsPagedCallable", "searchAssignmentsCallable"] + }, + "SplitCapacityCommitment": { + "methods": ["splitCapacityCommitment", "splitCapacityCommitment", "splitCapacityCommitment", "splitCapacityCommitmentCallable"] + }, + "UpdateBiReservation": { + "methods": ["updateBiReservation", "updateBiReservation", "updateBiReservationCallable"] + }, + "UpdateCapacityCommitment": { + "methods": ["updateCapacityCommitment", "updateCapacityCommitment", "updateCapacityCommitmentCallable"] + }, + "UpdateReservation": { + "methods": ["updateReservation", "updateReservation", "updateReservationCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index d5b7ed33..7763e9d4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigqueryreservation.git", - "sha": "39454f442c17e7f94ea62001763f367efc44ac4d" + "sha": "eec8507eaacb9ec7a83933fe1e54d4a20b8aad65" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", - "internalRef": "357800868" + "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", + "internalRef": "358516065" } }, { @@ -103,6 +103,7 @@ "codecov.yaml", "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceClient.java", "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/ReservationServiceSettings.java", + "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/gapic_metadata.json", "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/package-info.java", "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceCallableFactory.java", "google-cloud-bigqueryreservation/src/main/java/com/google/cloud/bigquery/reservation/v1/stub/GrpcReservationServiceStub.java", From 4ecb493e29a23209b9f0b1cc841fa9f39fab1bc8 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Tue, 23 Feb 2021 12:29:47 -0500 Subject: [PATCH 27/28] ci: test out new sonatype google endpoint (#327) --- google-cloud-bigqueryreservation-bom/pom.xml | 17 ++++++++++++--- pom.xml | 23 ++++++++++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/google-cloud-bigqueryreservation-bom/pom.xml b/google-cloud-bigqueryreservation-bom/pom.xml index c6215487..fd7b399d 100644 --- a/google-cloud-bigqueryreservation-bom/pom.xml +++ b/google-cloud-bigqueryreservation-bom/pom.xml @@ -42,11 +42,11 @@ sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots + https://google.oss.sonatype.org/content/repositories/snapshots sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://google.oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -60,7 +60,6 @@ - com.google.cloud google-cloud-bigqueryreservation @@ -88,6 +87,18 @@ true + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://google.oss.sonatype.org/ + false + 15 + + diff --git a/pom.xml b/pom.xml index 0408c321..942df774 100644 --- a/pom.xml +++ b/pom.xml @@ -44,11 +44,11 @@ sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots + https://google.oss.sonatype.org/content/repositories/snapshots sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://google.oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -177,4 +177,23 @@ + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://google.oss.sonatype.org/ + false + 15 + + + + + From 44bd89a2271474c8fb3cc71710e1f2e287de9245 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 23 Feb 2021 12:39:35 -0500 Subject: [PATCH 28/28] chore(master): release 1.1.0 (#313) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 17 +++++++++++++++++ google-cloud-bigqueryreservation-bom/pom.xml | 8 ++++---- google-cloud-bigqueryreservation/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 8 ++++---- .../pom.xml | 4 ++-- versions.txt | 6 +++--- 7 files changed, 34 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e739e20f..9cf6b0c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/java-bigqueryreservation/compare/v1.0.8...v1.1.0) (2021-02-23) + + +### Features + +* generate sample code in the Java microgenerator ([#316](https://www.github.com/googleapis/java-bigqueryreservation/issues/316)) ([2906ada](https://www.github.com/googleapis/java-bigqueryreservation/commit/2906ada0df29eb094c214fd3767efe381a571406)) + + +### Documentation + +* **samples:** add quickstart sample ([#302](https://www.github.com/googleapis/java-bigqueryreservation/issues/302)) ([7199e0a](https://www.github.com/googleapis/java-bigqueryreservation/commit/7199e0a2d7f7f8b5d03a21fbae96ee7f8828c750)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#325](https://www.github.com/googleapis/java-bigqueryreservation/issues/325)) ([eec8507](https://www.github.com/googleapis/java-bigqueryreservation/commit/eec8507eaacb9ec7a83933fe1e54d4a20b8aad65)) + ### [1.0.8](https://www.github.com/googleapis/java-bigqueryreservation/compare/v1.0.7...v1.0.8) (2021-01-14) diff --git a/google-cloud-bigqueryreservation-bom/pom.xml b/google-cloud-bigqueryreservation-bom/pom.xml index fd7b399d..a5ef3abf 100644 --- a/google-cloud-bigqueryreservation-bom/pom.xml +++ b/google-cloud-bigqueryreservation-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation-bom - 1.0.9-SNAPSHOT + 1.1.0 pom com.google.cloud @@ -63,17 +63,17 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.9-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 diff --git a/google-cloud-bigqueryreservation/pom.xml b/google-cloud-bigqueryreservation/pom.xml index b53f1c39..39675dac 100644 --- a/google-cloud-bigqueryreservation/pom.xml +++ b/google-cloud-bigqueryreservation/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigqueryreservation - 1.0.9-SNAPSHOT + 1.1.0 jar Google Cloud BigQuery Reservations https://github.com/googleapis/java-bigqueryreservation @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.9-SNAPSHOT + 1.1.0 google-cloud-bigqueryreservation diff --git a/grpc-google-cloud-bigqueryreservation-v1/pom.xml b/grpc-google-cloud-bigqueryreservation-v1/pom.xml index 817ca90b..32de8676 100644 --- a/grpc-google-cloud-bigqueryreservation-v1/pom.xml +++ b/grpc-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 grpc-google-cloud-bigqueryreservation-v1 GRPC library for grpc-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.9-SNAPSHOT + 1.1.0 diff --git a/pom.xml b/pom.xml index 942df774..932565dd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigqueryreservation-parent pom - 1.0.9-SNAPSHOT + 1.1.0 Google Cloud BigQuery Reservations Parent https://github.com/googleapis/java-bigqueryreservation @@ -70,17 +70,17 @@ com.google.cloud google-cloud-bigqueryreservation - 1.0.9-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 diff --git a/proto-google-cloud-bigqueryreservation-v1/pom.xml b/proto-google-cloud-bigqueryreservation-v1/pom.xml index 13f25c97..4afdcf91 100644 --- a/proto-google-cloud-bigqueryreservation-v1/pom.xml +++ b/proto-google-cloud-bigqueryreservation-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigqueryreservation-v1 - 1.0.9-SNAPSHOT + 1.1.0 proto-google-cloud-bigqueryreservation-v1 PROTO library for proto-google-cloud-bigqueryreservation-v1 com.google.cloud google-cloud-bigqueryreservation-parent - 1.0.9-SNAPSHOT + 1.1.0 diff --git a/versions.txt b/versions.txt index d0d7d47c..35626933 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-bigqueryreservation:1.0.8:1.0.9-SNAPSHOT -proto-google-cloud-bigqueryreservation-v1:1.0.8:1.0.9-SNAPSHOT -grpc-google-cloud-bigqueryreservation-v1:1.0.8:1.0.9-SNAPSHOT +google-cloud-bigqueryreservation:1.1.0:1.1.0 +proto-google-cloud-bigqueryreservation-v1:1.1.0:1.1.0 +grpc-google-cloud-bigqueryreservation-v1:1.1.0:1.1.0