From 76c5983a194d299e05ec560a189a45147afb28c7 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Fri, 9 Sep 2022 14:38:17 +0000
Subject: [PATCH 1/6] chore(bazel): Update WORKSPACE files for rules_gapic,
gax_java, generator_java versions (#243)
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 472750037
Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24
Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
---
README.md | 6 +-
.../shell/v1/CloudShellServiceClient.java | 140 +++++++++++++-----
.../shell/v1/CloudShellServiceSettings.java | 12 +-
.../google/cloud/shell/v1/package-info.java | 7 +-
.../stub/CloudShellServiceStubSettings.java | 12 +-
.../stub/HttpJsonCloudShellServiceStub.java | 10 +-
.../addpublickey/AsyncAddPublicKey.java | 7 +-
.../addpublickey/AsyncAddPublicKeyLRO.java | 7 +-
.../addpublickey/SyncAddPublicKey.java | 7 +-
.../AsyncAuthorizeEnvironment.java | 7 +-
.../AsyncAuthorizeEnvironmentLRO.java | 7 +-
.../SyncAuthorizeEnvironment.java | 7 +-
.../SyncCreateSetCredentialsProvider.java | 7 +-
.../SyncCreateSetCredentialsProvider1.java | 7 +-
.../create/SyncCreateSetEndpoint.java | 7 +-
.../getenvironment/AsyncGetEnvironment.java | 7 +-
.../getenvironment/SyncGetEnvironment.java | 7 +-
.../SyncGetEnvironmentEnvironmentname.java | 7 +-
.../SyncGetEnvironmentString.java | 7 +-
.../removepublickey/AsyncRemovePublicKey.java | 7 +-
.../AsyncRemovePublicKeyLRO.java | 7 +-
.../removepublickey/SyncRemovePublicKey.java | 7 +-
.../AsyncStartEnvironment.java | 7 +-
.../AsyncStartEnvironmentLRO.java | 7 +-
.../SyncStartEnvironment.java | 7 +-
.../getenvironment/SyncGetEnvironment.java | 12 +-
.../getenvironment/SyncGetEnvironment.java | 12 +-
27 files changed, 233 insertions(+), 111 deletions(-)
diff --git a/README.md b/README.md
index bdb9fb07..0e62a57c 100644
--- a/README.md
+++ b/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
* Environment response = cloudShellServiceClient.getEnvironment(name);
@@ -79,8 +82,11 @@
* To customize credentials:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudShellServiceSettings cloudShellServiceSettings =
* CloudShellServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -92,8 +98,11 @@
* To customize the endpoint:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudShellServiceSettings cloudShellServiceSettings =
* CloudShellServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* CloudShellServiceClient cloudShellServiceClient =
@@ -104,8 +113,11 @@
* the wire:
*
* {@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudShellServiceSettings cloudShellServiceSettings =
* CloudShellServiceSettings.newBuilder()
* .setTransportChannelProvider(
@@ -199,8 +211,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
* Environment response = cloudShellServiceClient.getEnvironment(name);
@@ -225,8 +240,11 @@ public final Environment getEnvironment(EnvironmentName name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* String name = EnvironmentName.of("[USER]", "[ENVIRONMENT]").toString();
* Environment response = cloudShellServiceClient.getEnvironment(name);
@@ -250,8 +268,11 @@ public final Environment getEnvironment(String name) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* GetEnvironmentRequest request =
* GetEnvironmentRequest.newBuilder()
@@ -275,8 +296,11 @@ public final Environment getEnvironment(GetEnvironmentRequest request) {
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* GetEnvironmentRequest request =
* GetEnvironmentRequest.newBuilder()
@@ -304,8 +328,11 @@ public final UnaryCallable getEnvironmentCal
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* StartEnvironmentRequest request =
* StartEnvironmentRequest.newBuilder()
@@ -337,8 +364,11 @@ public final UnaryCallable getEnvironmentCal
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* StartEnvironmentRequest request =
* StartEnvironmentRequest.newBuilder()
@@ -370,8 +400,11 @@ public final UnaryCallable getEnvironmentCal
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* StartEnvironmentRequest request =
* StartEnvironmentRequest.newBuilder()
@@ -399,8 +432,11 @@ public final UnaryCallable startEnvironmentC
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AuthorizeEnvironmentRequest request =
* AuthorizeEnvironmentRequest.newBuilder()
@@ -431,8 +467,11 @@ public final UnaryCallable startEnvironmentC
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AuthorizeEnvironmentRequest request =
* AuthorizeEnvironmentRequest.newBuilder()
@@ -463,8 +502,11 @@ public final UnaryCallable startEnvironmentC
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AuthorizeEnvironmentRequest request =
* AuthorizeEnvironmentRequest.newBuilder()
@@ -494,8 +536,11 @@ public final UnaryCallable startEnvironmentC
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AddPublicKeyRequest request =
* AddPublicKeyRequest.newBuilder()
@@ -523,8 +568,11 @@ public final OperationFuture addPubl
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AddPublicKeyRequest request =
* AddPublicKeyRequest.newBuilder()
@@ -552,8 +600,11 @@ public final OperationFuture addPubl
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* AddPublicKeyRequest request =
* AddPublicKeyRequest.newBuilder()
@@ -580,8 +631,11 @@ public final UnaryCallable addPublicKeyCallable(
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* RemovePublicKeyRequest request =
* RemovePublicKeyRequest.newBuilder()
@@ -610,8 +664,11 @@ public final UnaryCallable addPublicKeyCallable(
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* RemovePublicKeyRequest request =
* RemovePublicKeyRequest.newBuilder()
@@ -640,8 +697,11 @@ public final UnaryCallable addPublicKeyCallable(
* Sample code:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* RemovePublicKeyRequest request =
* RemovePublicKeyRequest.newBuilder()
diff --git a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceSettings.java b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceSettings.java
index 48cb7c57..6a0b7b40 100644
--- a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceSettings.java
+++ b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/CloudShellServiceSettings.java
@@ -52,17 +52,17 @@
* For example, to set the total timeout of getEnvironment to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudShellServiceSettings.Builder cloudShellServiceSettingsBuilder =
* CloudShellServiceSettings.newBuilder();
* cloudShellServiceSettingsBuilder
* .getEnvironmentSettings()
* .setRetrySettings(
- * cloudShellServiceSettingsBuilder
- * .getEnvironmentSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * cloudShellServiceSettingsBuilder.getEnvironmentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudShellServiceSettings cloudShellServiceSettings = cloudShellServiceSettingsBuilder.build();
diff --git a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/package-info.java b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/package-info.java
index 350bdd67..df7be5da 100644
--- a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/package-info.java
+++ b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/package-info.java
@@ -28,8 +28,11 @@
* Sample for CloudShellServiceClient:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
* EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
* Environment response = cloudShellServiceClient.getEnvironment(name);
diff --git a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java
index 57f7677a..58c840d5 100644
--- a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java
+++ b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/CloudShellServiceStubSettings.java
@@ -80,17 +80,17 @@
* For example, to set the total timeout of getEnvironment to 30 seconds:
*
*
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* CloudShellServiceStubSettings.Builder cloudShellServiceSettingsBuilder =
* CloudShellServiceStubSettings.newBuilder();
* cloudShellServiceSettingsBuilder
* .getEnvironmentSettings()
* .setRetrySettings(
- * cloudShellServiceSettingsBuilder
- * .getEnvironmentSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * cloudShellServiceSettingsBuilder.getEnvironmentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CloudShellServiceStubSettings cloudShellServiceSettings =
diff --git a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/HttpJsonCloudShellServiceStub.java b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/HttpJsonCloudShellServiceStub.java
index 6fa309f5..cc942c30 100644
--- a/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/HttpJsonCloudShellServiceStub.java
+++ b/google-cloud-shell/src/main/java/com/google/cloud/shell/v1/stub/HttpJsonCloudShellServiceStub.java
@@ -136,7 +136,7 @@ public class HttpJsonCloudShellServiceStub extends CloudShellServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearName().build()))
+ .toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -175,7 +175,7 @@ public class HttpJsonCloudShellServiceStub extends CloudShellServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearName().build()))
+ .toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -215,7 +215,8 @@ public class HttpJsonCloudShellServiceStub extends CloudShellServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearEnvironment().build()))
+ .toBody(
+ "*", request.toBuilder().clearEnvironment().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -255,7 +256,8 @@ public class HttpJsonCloudShellServiceStub extends CloudShellServiceStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearEnvironment().build()))
+ .toBody(
+ "*", request.toBuilder().clearEnvironment().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKey.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKey.java
index 4ef2b6ed..3d6faef9 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKey.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKey.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncAddPublicKey() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AddPublicKeyRequest request =
AddPublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKeyLRO.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKeyLRO.java
index 64354f8b..759fe451 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKeyLRO.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/AsyncAddPublicKeyLRO.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncAddPublicKeyLRO() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AddPublicKeyRequest request =
AddPublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/SyncAddPublicKey.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/SyncAddPublicKey.java
index fe40f82f..c1e50aa9 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/SyncAddPublicKey.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/addpublickey/SyncAddPublicKey.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncAddPublicKey() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AddPublicKeyRequest request =
AddPublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironment.java
index c2f8c336..8bdb006e 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironment.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncAuthorizeEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AuthorizeEnvironmentRequest request =
AuthorizeEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironmentLRO.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironmentLRO.java
index 898adf64..553ab21f 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironmentLRO.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/AsyncAuthorizeEnvironmentLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncAuthorizeEnvironmentLRO() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AuthorizeEnvironmentRequest request =
AuthorizeEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/SyncAuthorizeEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/SyncAuthorizeEnvironment.java
index 1955955e..12388a6a 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/SyncAuthorizeEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/authorizeenvironment/SyncAuthorizeEnvironment.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncAuthorizeEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
AuthorizeEnvironmentRequest request =
AuthorizeEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider.java
index 35ca7c3e..5adbd838 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncCreateSetCredentialsProvider() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudShellServiceSettings cloudShellServiceSettings =
CloudShellServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 35b5b445..319118b1 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncCreateSetCredentialsProvider1() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudShellServiceSettings cloudShellServiceSettings =
CloudShellServiceSettings.newBuilder()
.setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetEndpoint.java
index b4d7c359..f16b6435 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncCreateSetEndpoint() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudShellServiceSettings cloudShellServiceSettings =
CloudShellServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudShellServiceClient cloudShellServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/AsyncGetEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/AsyncGetEnvironment.java
index 784e0dff..1a561b34 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/AsyncGetEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/AsyncGetEnvironment.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncGetEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironment.java
index 49db6eac..3fb3248f 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironment.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncGetEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
GetEnvironmentRequest request =
GetEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentEnvironmentname.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentEnvironmentname.java
index 2901e660..079a4914 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentEnvironmentname.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentEnvironmentname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncGetEnvironmentEnvironmentname() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
EnvironmentName name = EnvironmentName.of("[USER]", "[ENVIRONMENT]");
Environment response = cloudShellServiceClient.getEnvironment(name);
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentString.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentString.java
index 9ccce874..6391c424 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentString.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/getenvironment/SyncGetEnvironmentString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncGetEnvironmentString() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
String name = EnvironmentName.of("[USER]", "[ENVIRONMENT]").toString();
Environment response = cloudShellServiceClient.getEnvironment(name);
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKey.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKey.java
index a212a824..b9ae82ab 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKey.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKey.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncRemovePublicKey() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
RemovePublicKeyRequest request =
RemovePublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKeyLRO.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKeyLRO.java
index 86228fb5..d10c2704 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKeyLRO.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/AsyncRemovePublicKeyLRO.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncRemovePublicKeyLRO() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
RemovePublicKeyRequest request =
RemovePublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/SyncRemovePublicKey.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/SyncRemovePublicKey.java
index b96d8f93..0fb969be 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/SyncRemovePublicKey.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/removepublickey/SyncRemovePublicKey.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncRemovePublicKey() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
RemovePublicKeyRequest request =
RemovePublicKeyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironment.java
index b5186c1a..2f394614 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironment.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncStartEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
StartEnvironmentRequest request =
StartEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironmentLRO.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironmentLRO.java
index 1fd0a429..db72b72f 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironmentLRO.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/AsyncStartEnvironmentLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
}
public static void asyncStartEnvironmentLRO() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
StartEnvironmentRequest request =
StartEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/SyncStartEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/SyncStartEnvironment.java
index be5f03f8..57108334 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/SyncStartEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellserviceclient/startenvironment/SyncStartEnvironment.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}
public static void syncStartEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudShellServiceClient cloudShellServiceClient = CloudShellServiceClient.create()) {
StartEnvironmentRequest request =
StartEnvironmentRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellservicesettings/getenvironment/SyncGetEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellservicesettings/getenvironment/SyncGetEnvironment.java
index 91e4d8f2..4b21f291 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellservicesettings/getenvironment/SyncGetEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/cloudshellservicesettings/getenvironment/SyncGetEnvironment.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
}
public static void syncGetEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudShellServiceSettings.Builder cloudShellServiceSettingsBuilder =
CloudShellServiceSettings.newBuilder();
cloudShellServiceSettingsBuilder
.getEnvironmentSettings()
.setRetrySettings(
- cloudShellServiceSettingsBuilder
- .getEnvironmentSettings()
- .getRetrySettings()
- .toBuilder()
+ cloudShellServiceSettingsBuilder.getEnvironmentSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
CloudShellServiceSettings cloudShellServiceSettings = cloudShellServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/shell/v1/stub/cloudshellservicestubsettings/getenvironment/SyncGetEnvironment.java b/samples/snippets/generated/com/google/cloud/shell/v1/stub/cloudshellservicestubsettings/getenvironment/SyncGetEnvironment.java
index ba963045..b4edae4e 100644
--- a/samples/snippets/generated/com/google/cloud/shell/v1/stub/cloudshellservicestubsettings/getenvironment/SyncGetEnvironment.java
+++ b/samples/snippets/generated/com/google/cloud/shell/v1/stub/cloudshellservicestubsettings/getenvironment/SyncGetEnvironment.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
}
public static void syncGetEnvironment() throws Exception {
- // This snippet has been automatically generated for illustrative purposes only.
- // It may require modifications to work in your environment.
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
CloudShellServiceStubSettings.Builder cloudShellServiceSettingsBuilder =
CloudShellServiceStubSettings.newBuilder();
cloudShellServiceSettingsBuilder
.getEnvironmentSettings()
.setRetrySettings(
- cloudShellServiceSettingsBuilder
- .getEnvironmentSettings()
- .getRetrySettings()
- .toBuilder()
+ cloudShellServiceSettingsBuilder.getEnvironmentSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
CloudShellServiceStubSettings cloudShellServiceSettings =
From e16d0f36aa04ecd20c83d1eda145d8425e6e275e Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Fri, 9 Sep 2022 16:58:32 +0200
Subject: [PATCH 2/6] chore(deps): update dependency
com.google.cloud:google-cloud-shell to v2.2.5 (#247)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shell](https://togithub.com/googleapis/java-shell) | `2.2.4` -> `2.2.5` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox. âš **Warning**: custom changes will be lost.
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-shell).
---
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 0252e867..2d9f97ab 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
google-cloud-shell
- 2.2.4
+ 2.2.5
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 6b851dac..83c9ccf2 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-shell
- 2.2.4
+ 2.2.5
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index b74d26e9..c7ddd14a 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-shell
- 2.2.4
+ 2.2.5
From 2a94770ddbd2e6522043a0600fb4e220692a5728 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Fri, 9 Sep 2022 15:52:16 +0000
Subject: [PATCH 3/6] chore(main): release 2.2.6-SNAPSHOT (#246)
: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-shell-bom/pom.xml | 8 ++++----
google-cloud-shell/pom.xml | 4 ++--
grpc-google-cloud-shell-v1/pom.xml | 4 ++--
pom.xml | 8 ++++----
proto-google-cloud-shell-v1/pom.xml | 4 ++--
versions.txt | 6 +++---
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/google-cloud-shell-bom/pom.xml b/google-cloud-shell-bom/pom.xml
index cddbeae1..f68f2187 100644
--- a/google-cloud-shell-bom/pom.xml
+++ b/google-cloud-shell-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-shell-bom
- 2.2.5
+ 2.2.6-SNAPSHOT
pom
com.google.cloud
@@ -56,17 +56,17 @@
com.google.cloud
google-cloud-shell
- 2.2.5
+ 2.2.6-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
diff --git a/google-cloud-shell/pom.xml b/google-cloud-shell/pom.xml
index 826a2a49..7d0dc0f9 100644
--- a/google-cloud-shell/pom.xml
+++ b/google-cloud-shell/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-shell
- 2.2.5
+ 2.2.6-SNAPSHOT
jar
Google Cloud Shell
https://github.com/googleapis/java-shell
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-shell-parent
- 2.2.5
+ 2.2.6-SNAPSHOT
google-cloud-shell
diff --git a/grpc-google-cloud-shell-v1/pom.xml b/grpc-google-cloud-shell-v1/pom.xml
index db18759b..d55a8279 100644
--- a/grpc-google-cloud-shell-v1/pom.xml
+++ b/grpc-google-cloud-shell-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
grpc-google-cloud-shell-v1
GRPC library for google-cloud-shell
com.google.cloud
google-cloud-shell-parent
- 2.2.5
+ 2.2.6-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index e473e313..47348462 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-shell-parent
pom
- 2.2.5
+ 2.2.6-SNAPSHOT
Google Cloud Shell Parent
https://github.com/googleapis/java-shell
@@ -60,17 +60,17 @@
com.google.cloud
google-cloud-shell
- 2.2.5
+ 2.2.6-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
diff --git a/proto-google-cloud-shell-v1/pom.xml b/proto-google-cloud-shell-v1/pom.xml
index fb5bee00..5c0be033 100644
--- a/proto-google-cloud-shell-v1/pom.xml
+++ b/proto-google-cloud-shell-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.5
+ 2.2.6-SNAPSHOT
proto-google-cloud-shell-v1
Proto library for google-cloud-shell
com.google.cloud
google-cloud-shell-parent
- 2.2.5
+ 2.2.6-SNAPSHOT
diff --git a/versions.txt b/versions.txt
index 170a1b9f..7719ef13 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-shell:2.2.5:2.2.5
-grpc-google-cloud-shell-v1:2.2.5:2.2.5
-proto-google-cloud-shell-v1:2.2.5:2.2.5
+google-cloud-shell:2.2.5:2.2.6-SNAPSHOT
+grpc-google-cloud-shell-v1:2.2.5:2.2.6-SNAPSHOT
+proto-google-cloud-shell-v1:2.2.5:2.2.6-SNAPSHOT
From ea5fcb3a0e0e483fae222d0b5d0f51e70f59a3d7 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Sat, 10 Sep 2022 02:14:16 +0000
Subject: [PATCH 4/6] chore: Generated snippets should not be owned by samples
reviewers (#1575) (#248)
Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
---
.github/.OwlBot.lock.yaml | 3 +--
.github/CODEOWNERS | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 6610882f..62592923 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -13,5 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9
-# created: 2022-07-18T21:44:23.94208526Z
+ digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 1578dc2f..5232f38f 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -10,3 +10,6 @@
# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
+
+# Generated snippets should not be owned by samples reviewers
+samples/snippets/generated/ @googleapis/yoshi-java
From 7515d3dd5f80e775ca82a8f5e344d0d26927e7d3 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Thu, 15 Sep 2022 15:04:20 +0200
Subject: [PATCH 5/6] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v3.0.3 (#249)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](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) | `3.0.2` -> `3.0.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-dependencies
### [`v3.0.3`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#303-httpsgithubcomgoogleapisjava-shared-dependenciescomparev302v303-2022-09-14)
[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.2...v3.0.3)
##### Dependencies
- Google-cloud-core 2.8.12 ([#799](https://togithub.com/googleapis/java-shared-dependencies/issues/799)) ([1b3db8d](https://togithub.com/googleapis/java-shared-dependencies/commit/1b3db8d1e17c49ebae79fc96164fa9058e1df6e3))
- Moving gson to first-party-dependencies ([#800](https://togithub.com/googleapis/java-shared-dependencies/issues/800)) ([a41fcc1](https://togithub.com/googleapis/java-shared-dependencies/commit/a41fcc11d32e02e5af2837561792e3919f6d4b3f))
- Update dependency com.google.protobuf:protobuf-bom to v3.21.6 ([#797](https://togithub.com/googleapis/java-shared-dependencies/issues/797)) ([bc5fdc9](https://togithub.com/googleapis/java-shared-dependencies/commit/bc5fdc9b3af7973c28f063a9ac156fe2af562814))
- Update gax.version to v2.19.1 ([#798](https://togithub.com/googleapis/java-shared-dependencies/issues/798)) ([84e5487](https://togithub.com/googleapis/java-shared-dependencies/commit/84e5487b2e3dce4bb60badecebde788c3cb702b8))
- Update google.core.version to v2.8.11 ([#793](https://togithub.com/googleapis/java-shared-dependencies/issues/793)) ([63c1297](https://togithub.com/googleapis/java-shared-dependencies/commit/63c129722aa0b821031ff5b4c11004adf7b12044))
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-shell).
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 47348462..4d73d912 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
com.google.cloud
google-cloud-shared-dependencies
- 3.0.2
+ 3.0.3
pom
import
From 4c05285f3eff5e1f43d1ff14a0c12230319dc1d3 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Thu, 15 Sep 2022 13:18:14 +0000
Subject: [PATCH 6/6] chore(main): release 2.2.6 (#250)
:robot: I have created a release *beep* *boop*
---
## [2.2.6](https://github.com/googleapis/java-shell/compare/v2.2.5...v2.2.6) (2022-09-15)
### Dependencies
* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#249](https://github.com/googleapis/java-shell/issues/249)) ([7515d3d](https://github.com/googleapis/java-shell/commit/7515d3dd5f80e775ca82a8f5e344d0d26927e7d3))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 7 +++++++
google-cloud-shell-bom/pom.xml | 8 ++++----
google-cloud-shell/pom.xml | 4 ++--
grpc-google-cloud-shell-v1/pom.xml | 4 ++--
pom.xml | 8 ++++----
proto-google-cloud-shell-v1/pom.xml | 4 ++--
versions.txt | 6 +++---
7 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ca1164a1..113719c1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## [2.2.6](https://github.com/googleapis/java-shell/compare/v2.2.5...v2.2.6) (2022-09-15)
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#249](https://github.com/googleapis/java-shell/issues/249)) ([7515d3d](https://github.com/googleapis/java-shell/commit/7515d3dd5f80e775ca82a8f5e344d0d26927e7d3))
+
## [2.2.5](https://github.com/googleapis/java-shell/compare/v2.2.4...v2.2.5) (2022-09-09)
diff --git a/google-cloud-shell-bom/pom.xml b/google-cloud-shell-bom/pom.xml
index f68f2187..deb090d6 100644
--- a/google-cloud-shell-bom/pom.xml
+++ b/google-cloud-shell-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-shell-bom
- 2.2.6-SNAPSHOT
+ 2.2.6
pom
com.google.cloud
@@ -56,17 +56,17 @@
com.google.cloud
google-cloud-shell
- 2.2.6-SNAPSHOT
+ 2.2.6
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
diff --git a/google-cloud-shell/pom.xml b/google-cloud-shell/pom.xml
index 7d0dc0f9..99d49051 100644
--- a/google-cloud-shell/pom.xml
+++ b/google-cloud-shell/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-shell
- 2.2.6-SNAPSHOT
+ 2.2.6
jar
Google Cloud Shell
https://github.com/googleapis/java-shell
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-shell-parent
- 2.2.6-SNAPSHOT
+ 2.2.6
google-cloud-shell
diff --git a/grpc-google-cloud-shell-v1/pom.xml b/grpc-google-cloud-shell-v1/pom.xml
index d55a8279..60c6e050 100644
--- a/grpc-google-cloud-shell-v1/pom.xml
+++ b/grpc-google-cloud-shell-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
grpc-google-cloud-shell-v1
GRPC library for google-cloud-shell
com.google.cloud
google-cloud-shell-parent
- 2.2.6-SNAPSHOT
+ 2.2.6
diff --git a/pom.xml b/pom.xml
index 4d73d912..a527630f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-shell-parent
pom
- 2.2.6-SNAPSHOT
+ 2.2.6
Google Cloud Shell Parent
https://github.com/googleapis/java-shell
@@ -60,17 +60,17 @@
com.google.cloud
google-cloud-shell
- 2.2.6-SNAPSHOT
+ 2.2.6
com.google.api.grpc
grpc-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
diff --git a/proto-google-cloud-shell-v1/pom.xml b/proto-google-cloud-shell-v1/pom.xml
index 5c0be033..6bc65578 100644
--- a/proto-google-cloud-shell-v1/pom.xml
+++ b/proto-google-cloud-shell-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-shell-v1
- 2.2.6-SNAPSHOT
+ 2.2.6
proto-google-cloud-shell-v1
Proto library for google-cloud-shell
com.google.cloud
google-cloud-shell-parent
- 2.2.6-SNAPSHOT
+ 2.2.6
diff --git a/versions.txt b/versions.txt
index 7719ef13..e672a9e4 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
# Format:
# module:released-version:current-version
-google-cloud-shell:2.2.5:2.2.6-SNAPSHOT
-grpc-google-cloud-shell-v1:2.2.5:2.2.6-SNAPSHOT
-proto-google-cloud-shell-v1:2.2.5:2.2.6-SNAPSHOT
+google-cloud-shell:2.2.6:2.2.6
+grpc-google-cloud-shell-v1:2.2.6:2.2.6
+proto-google-cloud-shell-v1:2.2.6:2.2.6