From 84f2ed262a27f2afea53016b94de759e221921b3 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:52:14 +0000 Subject: [PATCH] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#926) - [ ] 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 --- .../v1/ContainerAnalysisClient.java | 140 +++++++++++++----- .../v1/ContainerAnalysisSettings.java | 12 +- .../containeranalysis/v1/package-info.java | 7 +- .../stub/ContainerAnalysisStubSettings.java | 12 +- .../stub/HttpJsonContainerAnalysisStub.java | 6 +- 5 files changed, 120 insertions(+), 57 deletions(-) diff --git a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java index e16d3d308271..354836de5888 100644 --- a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java +++ b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java @@ -53,8 +53,11 @@ * calls that map to API methods. Sample code to get started: * *
{@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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
  *   ResourceName resource =
  *       new ResourceName() {
@@ -110,8 +113,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
  * ContainerAnalysisSettings containerAnalysisSettings =
  *     ContainerAnalysisSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -123,8 +129,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
  * ContainerAnalysisSettings containerAnalysisSettings =
  *     ContainerAnalysisSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ContainerAnalysisClient containerAnalysisClient =
@@ -135,8 +144,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
  * ContainerAnalysisSettings containerAnalysisSettings =
  *     ContainerAnalysisSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -218,8 +230,11 @@ public ContainerAnalysisStub getStub() {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   ResourceName resource =
    *       new ResourceName() {
@@ -273,8 +288,11 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   String resource = ProjectName.of("[PROJECT]").toString();
    *   Policy policy = Policy.newBuilder().build();
@@ -307,8 +325,11 @@ public final Policy setIamPolicy(String resource, Policy policy) {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   SetIamPolicyRequest request =
    *       SetIamPolicyRequest.newBuilder()
@@ -339,8 +360,11 @@ public final Policy setIamPolicy(SetIamPolicyRequest 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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   SetIamPolicyRequest request =
    *       SetIamPolicyRequest.newBuilder()
@@ -370,8 +394,11 @@ public final UnaryCallable setIamPolicyCallable() {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   ResourceName resource =
    *       new ResourceName() {
@@ -420,8 +447,11 @@ public final Policy getIamPolicy(ResourceName resource) {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   String resource = ProjectName.of("[PROJECT]").toString();
    *   Policy response = containerAnalysisClient.getIamPolicy(resource);
@@ -449,8 +479,11 @@ public final Policy getIamPolicy(String resource) {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   GetIamPolicyRequest request =
    *       GetIamPolicyRequest.newBuilder()
@@ -480,8 +513,11 @@ public final Policy getIamPolicy(GetIamPolicyRequest 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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   GetIamPolicyRequest request =
    *       GetIamPolicyRequest.newBuilder()
@@ -509,8 +545,11 @@ public final UnaryCallable getIamPolicyCallable() {
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   ResourceName resource =
    *       new ResourceName() {
@@ -565,8 +604,11 @@ public final TestIamPermissionsResponse testIamPermissions(
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   String resource = ProjectName.of("[PROJECT]").toString();
    *   List permissions = new ArrayList<>();
@@ -603,8 +645,11 @@ public final TestIamPermissionsResponse testIamPermissions(
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   TestIamPermissionsRequest request =
    *       TestIamPermissionsRequest.newBuilder()
@@ -633,8 +678,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   TestIamPermissionsRequest request =
    *       TestIamPermissionsRequest.newBuilder()
@@ -660,8 +708,11 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
    *   String filter = "filter-1274492040";
@@ -692,8 +743,11 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
    *   String filter = "filter-1274492040";
@@ -724,8 +778,11 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   GetVulnerabilityOccurrencesSummaryRequest request =
    *       GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
@@ -752,8 +809,11 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
    * 

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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
    *   GetVulnerabilityOccurrencesSummaryRequest request =
    *       GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
diff --git a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
index 2d61f2e90e6b..77fb550fba12 100644
--- a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
+++ b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
@@ -58,17 +58,17 @@
  * 

For example, to set the total timeout of setIamPolicy 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
  * ContainerAnalysisSettings.Builder containerAnalysisSettingsBuilder =
  *     ContainerAnalysisSettings.newBuilder();
  * containerAnalysisSettingsBuilder
  *     .setIamPolicySettings()
  *     .setRetrySettings(
- *         containerAnalysisSettingsBuilder
- *             .setIamPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         containerAnalysisSettingsBuilder.setIamPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ContainerAnalysisSettings containerAnalysisSettings = containerAnalysisSettingsBuilder.build();
diff --git a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java
index 3e09b4e66c1b..f32867fa1b1d 100644
--- a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java
+++ b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java
@@ -36,8 +36,11 @@
  * 

Sample for ContainerAnalysisClient: * *

{@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 (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
  *   ResourceName resource =
  *       new ResourceName() {
diff --git a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
index 0aee3f3d0b10..77047425bf0d 100644
--- a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
+++ b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
@@ -69,17 +69,17 @@
  * 

For example, to set the total timeout of setIamPolicy 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
  * ContainerAnalysisStubSettings.Builder containerAnalysisSettingsBuilder =
  *     ContainerAnalysisStubSettings.newBuilder();
  * containerAnalysisSettingsBuilder
  *     .setIamPolicySettings()
  *     .setRetrySettings(
- *         containerAnalysisSettingsBuilder
- *             .setIamPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         containerAnalysisSettingsBuilder.setIamPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ContainerAnalysisStubSettings containerAnalysisSettings =
diff --git a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/HttpJsonContainerAnalysisStub.java b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/HttpJsonContainerAnalysisStub.java
index 4f90d441f3d0..df44d6f843d0 100644
--- a/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/HttpJsonContainerAnalysisStub.java
+++ b/java-containeranalysis/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/HttpJsonContainerAnalysisStub.java
@@ -84,7 +84,7 @@ public class HttpJsonContainerAnalysisStub extends ContainerAnalysisStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearResource().build()))
+                                  .toBody("*", request.toBuilder().clearResource().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -122,7 +122,7 @@ public class HttpJsonContainerAnalysisStub extends ContainerAnalysisStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearResource().build()))
+                                  .toBody("*", request.toBuilder().clearResource().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -161,7 +161,7 @@ public class HttpJsonContainerAnalysisStub extends ContainerAnalysisStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearResource().build()))
+                                  .toBody("*", request.toBuilder().clearResource().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()