From 3ca8a955641c948c36bac0dacba7340657f6ff0c 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:42:18 +0000 Subject: [PATCH] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#418) - [ ] 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 --- .../com/google/iam/v2beta/PoliciesClient.java | 154 +++++++++++++----- .../google/iam/v2beta/PoliciesSettings.java | 12 +- .../com/google/iam/v2beta/package-info.java | 7 +- .../iam/v2beta/stub/HttpJsonPoliciesStub.java | 6 +- .../iam/v2beta/stub/PoliciesStubSettings.java | 12 +- 5 files changed, 131 insertions(+), 60 deletions(-) diff --git a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesClient.java b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesClient.java index 8cc89dce0128..495c60c01d91 100644 --- a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesClient.java +++ b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesClient.java @@ -45,8 +45,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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String name = "name3373707"; * Policy response = policiesClient.getPolicy(name); @@ -82,8 +85,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 * PoliciesSettings policiesSettings = * PoliciesSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -94,8 +100,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 * PoliciesSettings policiesSettings = * PoliciesSettings.newBuilder().setEndpoint(myEndpoint).build(); * PoliciesClient policiesClient = PoliciesClient.create(policiesSettings); @@ -105,8 +114,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 * PoliciesSettings policiesSettings = * PoliciesSettings.newBuilder() * .setTransportChannelProvider( @@ -200,8 +212,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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String parent = "parent-995424086"; * for (Policy element : policiesClient.listPolicies(parent).iterateAll()) { @@ -233,8 +248,11 @@ public final ListPoliciesPagedResponse listPolicies(String parent) { *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 (PoliciesClient policiesClient = PoliciesClient.create()) { * ListPoliciesRequest request = * ListPoliciesRequest.newBuilder() @@ -264,8 +282,11 @@ public final ListPoliciesPagedResponse listPolicies(ListPoliciesRequest 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * ListPoliciesRequest request = * ListPoliciesRequest.newBuilder() @@ -295,8 +316,11 @@ public final ListPoliciesPagedResponse listPolicies(ListPoliciesRequest 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * ListPoliciesRequest request = * ListPoliciesRequest.newBuilder() @@ -330,8 +354,11 @@ public final UnaryCallablelistPolici * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String name = "name3373707"; * Policy response = policiesClient.getPolicy(name); @@ -359,8 +386,11 @@ public final Policy getPolicy(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 (PoliciesClient policiesClient = PoliciesClient.create()) { * GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); * Policy response = policiesClient.getPolicy(request); @@ -381,8 +411,11 @@ public final Policy getPolicy(GetPolicyRequest 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * GetPolicyRequest request = GetPolicyRequest.newBuilder().setName("name3373707").build(); * ApiFuturefuture = policiesClient.getPolicyCallable().futureCall(request); @@ -402,8 +435,11 @@ public final UnaryCallable getPolicyCallable() { * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String parent = "parent-995424086"; * Policy policy = Policy.newBuilder().build(); @@ -444,8 +480,11 @@ public final OperationFuturecreatePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * CreatePolicyRequest request = * CreatePolicyRequest.newBuilder() @@ -472,8 +511,11 @@ public final OperationFuturecreatePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * CreatePolicyRequest request = * CreatePolicyRequest.newBuilder() @@ -500,8 +542,11 @@ public final OperationFuturecreatePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * CreatePolicyRequest request = * CreatePolicyRequest.newBuilder() @@ -535,8 +580,11 @@ public final UnaryCallablecreatePolicyCallable( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * UpdatePolicyRequest request = * UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); @@ -568,8 +616,11 @@ public final OperationFutureupdatePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * UpdatePolicyRequest request = * UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); @@ -601,8 +652,11 @@ public final OperationFutureupdatePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * UpdatePolicyRequest request = * UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); @@ -623,8 +677,11 @@ public final UnaryCallableupdatePolicyCallable( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String name = "name3373707"; * Policy response = policiesClient.deletePolicyAsync(name).get(); @@ -652,8 +709,11 @@ public final OperationFuturedeletePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * DeletePolicyRequest request = * DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); @@ -676,8 +736,11 @@ public final OperationFuturedeletePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * DeletePolicyRequest request = * DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); @@ -700,8 +763,11 @@ public final OperationFuturedeletePolicyAsync( * 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 (PoliciesClient policiesClient = PoliciesClient.create()) { * DeletePolicyRequest request = * DeletePolicyRequest.newBuilder().setName("name3373707").setEtag("etag3123477").build(); diff --git a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesSettings.java b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesSettings.java index 1f9de494ef34..de80d3ce6603 100644 --- a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesSettings.java +++ b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/PoliciesSettings.java @@ -55,16 +55,16 @@ *For example, to set the total timeout of getPolicy 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 * PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder(); * policiesSettingsBuilder * .getPolicySettings() * .setRetrySettings( - * policiesSettingsBuilder - * .getPolicySettings() - * .getRetrySettings() - * .toBuilder() + * policiesSettingsBuilder.getPolicySettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * PoliciesSettings policiesSettings = policiesSettingsBuilder.build(); diff --git a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/package-info.java b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/package-info.java index f8f79438d286..e5ed70548cda 100644 --- a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/package-info.java +++ b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/package-info.java @@ -26,8 +26,11 @@ *Sample for PoliciesClient: * *
{@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 (PoliciesClient policiesClient = PoliciesClient.create()) { * String name = "name3373707"; * Policy response = policiesClient.getPolicy(name); diff --git a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java index 1329c96f57bf..cd12ad2905d9 100644 --- a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java +++ b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/HttpJsonPoliciesStub.java @@ -160,7 +160,8 @@ public class HttpJsonPoliciesStub extends PoliciesStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("policy", request.getPolicy())) + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -199,7 +200,8 @@ public class HttpJsonPoliciesStub extends PoliciesStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("policy", request.getPolicy())) + ProtoRestSerializer.create() + .toBody("policy", request.getPolicy(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() diff --git a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java index 48a3936f6f94..7bfcfdf50cf6 100644 --- a/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java +++ b/java-iam/google-iam-policy/src/main/java/com/google/iam/v2beta/stub/PoliciesStubSettings.java @@ -83,16 +83,16 @@ * For example, to set the total timeout of getPolicy 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 * PoliciesStubSettings.Builder policiesSettingsBuilder = PoliciesStubSettings.newBuilder(); * policiesSettingsBuilder * .getPolicySettings() * .setRetrySettings( - * policiesSettingsBuilder - * .getPolicySettings() - * .getRetrySettings() - * .toBuilder() + * policiesSettingsBuilder.getPolicySettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * PoliciesStubSettings policiesSettings = policiesSettingsBuilder.build();