From 824e72b443629d03e0e72eba42c600c0a8952eb3 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 16:32:23 +0000 Subject: [PATCH] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#297) - [ ] 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 --- .../v2/ProfilerServiceClient.java | 70 +++++++++++++------ .../v2/ProfilerServiceSettings.java | 12 ++-- .../cloudprofiler/v2/package-info.java | 7 +- .../v2/stub/HttpJsonProfilerServiceStub.java | 8 ++- .../v2/stub/ProfilerServiceStubSettings.java | 12 ++-- 5 files changed, 72 insertions(+), 37 deletions(-) diff --git a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java index fb07f73ee604..659a206f5567 100644 --- a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java +++ b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java @@ -40,8 +40,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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateProfileRequest request = * CreateProfileRequest.newBuilder() @@ -83,8 +86,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 * ProfilerServiceSettings profilerServiceSettings = * ProfilerServiceSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -96,8 +102,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 * ProfilerServiceSettings profilerServiceSettings = * ProfilerServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); * ProfilerServiceClient profilerServiceClient = @@ -108,8 +117,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 * ProfilerServiceSettings profilerServiceSettings = * ProfilerServiceSettings.newBuilder() * .setTransportChannelProvider( @@ -187,8 +199,11 @@ public ProfilerServiceStub 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateProfileRequest request = * CreateProfileRequest.newBuilder() @@ -223,8 +238,11 @@ public final Profile createProfile(CreateProfileRequest 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateProfileRequest request = * CreateProfileRequest.newBuilder() @@ -250,8 +268,11 @@ public final UnaryCallablecreateProfileCallable( * 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateOfflineProfileRequest request = * CreateOfflineProfileRequest.newBuilder() @@ -277,8 +298,11 @@ public final Profile createOfflineProfile(CreateOfflineProfileRequest 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateOfflineProfileRequest request = * CreateOfflineProfileRequest.newBuilder() @@ -305,8 +329,11 @@ public final UnaryCallablecreateOfflinePr * 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * UpdateProfileRequest request = * UpdateProfileRequest.newBuilder() @@ -333,8 +360,11 @@ public final Profile updateProfile(UpdateProfileRequest 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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * UpdateProfileRequest request = * UpdateProfileRequest.newBuilder() diff --git a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java index 33f1b1ea583c..8e6798138678 100644 --- a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java +++ b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java @@ -50,17 +50,17 @@ *For example, to set the total timeout of createProfile 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 * ProfilerServiceSettings.Builder profilerServiceSettingsBuilder = * ProfilerServiceSettings.newBuilder(); * profilerServiceSettingsBuilder * .createProfileSettings() * .setRetrySettings( - * profilerServiceSettingsBuilder - * .createProfileSettings() - * .getRetrySettings() - * .toBuilder() + * profilerServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * ProfilerServiceSettings profilerServiceSettings = profilerServiceSettingsBuilder.build(); diff --git a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java index e3dea2467fb3..7b505ca470f9 100644 --- a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java +++ b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java @@ -32,8 +32,11 @@ *Sample for ProfilerServiceClient: * *
{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) { * CreateProfileRequest request = * CreateProfileRequest.newBuilder() diff --git a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java index 2ba41df61809..779f439ea9a5 100644 --- a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java +++ b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java @@ -79,7 +79,7 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -115,7 +115,8 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("profile", request.getProfile())) + ProtoRestSerializer.create() + .toBody("profile", request.getProfile(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -152,7 +153,8 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("profile", request.getProfile())) + ProtoRestSerializer.create() + .toBody("profile", request.getProfile(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() diff --git a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java index f2ed96c41d2c..b8da89105b52 100644 --- a/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java +++ b/java-profiler/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java @@ -65,17 +65,17 @@ * For example, to set the total timeout of createProfile 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 * ProfilerServiceStubSettings.Builder profilerServiceSettingsBuilder = * ProfilerServiceStubSettings.newBuilder(); * profilerServiceSettingsBuilder * .createProfileSettings() * .setRetrySettings( - * profilerServiceSettingsBuilder - * .createProfileSettings() - * .getRetrySettings() - * .toBuilder() + * profilerServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * ProfilerServiceStubSettings profilerServiceSettings = profilerServiceSettingsBuilder.build();