diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechClient.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechClient.java index 857b22dbbaa6..a07689075c0f 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechClient.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechClient.java @@ -32,8 +32,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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); @@ -69,8 +72,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -81,8 +87,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder().setEndpoint(myEndpoint).build(); * TextToSpeechClient textToSpeechClient = TextToSpeechClient.create(textToSpeechSettings); @@ -92,8 +101,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder() * .setTransportChannelProvider( @@ -160,8 +172,11 @@ public TextToSpeechStub 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); @@ -189,8 +204,11 @@ public final ListVoicesResponse listVoices(String languageCode) { *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * ListVoicesRequest request = * ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); @@ -212,8 +230,11 @@ public final ListVoicesResponse listVoices(ListVoicesRequest 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * ListVoicesRequest request = * ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); @@ -235,8 +256,11 @@ public final UnaryCallablelistVoicesCall * 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesisInput input = SynthesisInput.newBuilder().build(); * VoiceSelectionParams voice = VoiceSelectionParams.newBuilder().build(); @@ -269,8 +293,11 @@ public final SynthesizeSpeechResponse synthesizeSpeech( *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesizeSpeechRequest request = * SynthesizeSpeechRequest.newBuilder() @@ -296,8 +323,11 @@ public final SynthesizeSpeechResponse synthesizeSpeech(SynthesizeSpeechRequest r *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesizeSpeechRequest request = * SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechSettings.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechSettings.java index 62223287d474..597a342e8ff9 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechSettings.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechSettings.java @@ -50,16 +50,16 @@ *For example, to set the total timeout of listVoices 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 * TextToSpeechSettings.Builder textToSpeechSettingsBuilder = TextToSpeechSettings.newBuilder(); * textToSpeechSettingsBuilder * .listVoicesSettings() * .setRetrySettings( - * textToSpeechSettingsBuilder - * .listVoicesSettings() - * .getRetrySettings() - * .toBuilder() + * textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * TextToSpeechSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/package-info.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/package-info.java index d5ebc4774ec3..a36a7d152517 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/package-info.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/package-info.java @@ -26,8 +26,11 @@ *Sample for TextToSpeechClient: * *
{@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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/HttpJsonTextToSpeechStub.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/HttpJsonTextToSpeechStub.java index 90dac73e2500..3ab1aefb7663 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/HttpJsonTextToSpeechStub.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/HttpJsonTextToSpeechStub.java @@ -111,7 +111,8 @@ public class HttpJsonTextToSpeechStub extends TextToSpeechStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java index f3bb298554f4..38a86b385acc 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java @@ -65,17 +65,17 @@ * For example, to set the total timeout of listVoices 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 * TextToSpeechStubSettings.Builder textToSpeechSettingsBuilder = * TextToSpeechStubSettings.newBuilder(); * textToSpeechSettingsBuilder * .listVoicesSettings() * .setRetrySettings( - * textToSpeechSettingsBuilder - * .listVoicesSettings() - * .getRetrySettings() - * .toBuilder() + * textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * TextToSpeechStubSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechClient.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechClient.java index 6e65afe2a830..d9487e3d035e 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechClient.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechClient.java @@ -33,8 +33,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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); @@ -70,8 +73,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -82,8 +88,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder().setEndpoint(myEndpoint).build(); * TextToSpeechClient textToSpeechClient = TextToSpeechClient.create(textToSpeechSettings); @@ -93,8 +102,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 * TextToSpeechSettings textToSpeechSettings = * TextToSpeechSettings.newBuilder() * .setTransportChannelProvider( @@ -162,8 +174,11 @@ public TextToSpeechStub 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); @@ -191,8 +206,11 @@ public final ListVoicesResponse listVoices(String languageCode) { *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * ListVoicesRequest request = * ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); @@ -214,8 +232,11 @@ public final ListVoicesResponse listVoices(ListVoicesRequest 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * ListVoicesRequest request = * ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); @@ -237,8 +258,11 @@ public final UnaryCallablelistVoicesCall * 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesisInput input = SynthesisInput.newBuilder().build(); * VoiceSelectionParams voice = VoiceSelectionParams.newBuilder().build(); @@ -271,8 +295,11 @@ public final SynthesizeSpeechResponse synthesizeSpeech( *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesizeSpeechRequest request = * SynthesizeSpeechRequest.newBuilder() @@ -299,8 +326,11 @@ public final SynthesizeSpeechResponse synthesizeSpeech(SynthesizeSpeechRequest r *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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * SynthesizeSpeechRequest request = * SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechSettings.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechSettings.java index beee9277bf7b..53268a439c8c 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechSettings.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechSettings.java @@ -50,16 +50,16 @@ *For example, to set the total timeout of listVoices 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 * TextToSpeechSettings.Builder textToSpeechSettingsBuilder = TextToSpeechSettings.newBuilder(); * textToSpeechSettingsBuilder * .listVoicesSettings() * .setRetrySettings( - * textToSpeechSettingsBuilder - * .listVoicesSettings() - * .getRetrySettings() - * .toBuilder() + * textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * TextToSpeechSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/package-info.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/package-info.java index 266a021a8148..d5ec079725be 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/package-info.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/package-info.java @@ -26,8 +26,11 @@ *Sample for TextToSpeechClient: * *
{@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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { * String languageCode = "languageCode-2092349083"; * ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/HttpJsonTextToSpeechStub.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/HttpJsonTextToSpeechStub.java index 08d2479374c5..a53e031d01fb 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/HttpJsonTextToSpeechStub.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/HttpJsonTextToSpeechStub.java @@ -111,7 +111,8 @@ public class HttpJsonTextToSpeechStub extends TextToSpeechStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/TextToSpeechStubSettings.java b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/TextToSpeechStubSettings.java index 5984309bea2b..63b4039aa7ea 100644 --- a/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/TextToSpeechStubSettings.java +++ b/java-texttospeech/google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/TextToSpeechStubSettings.java @@ -65,17 +65,17 @@ * For example, to set the total timeout of listVoices 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 * TextToSpeechStubSettings.Builder textToSpeechSettingsBuilder = * TextToSpeechStubSettings.newBuilder(); * textToSpeechSettingsBuilder * .listVoicesSettings() * .setRetrySettings( - * textToSpeechSettingsBuilder - * .listVoicesSettings() - * .getRetrySettings() - * .toBuilder() + * textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * TextToSpeechStubSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java index d00d45cd750b..38564591d1d4 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 TextToSpeechStubSettings.Builder textToSpeechSettingsBuilder = TextToSpeechStubSettings.newBuilder(); textToSpeechSettingsBuilder .listVoicesSettings() .setRetrySettings( - textToSpeechSettingsBuilder - .listVoicesSettings() - .getRetrySettings() - .toBuilder() + textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); TextToSpeechStubSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java index 044014d5a907..e8fff19ed69a 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java index a39a792a7839..ffdb9fc54d1b 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetEndpoint.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetEndpoint.java index fedbd0d682cc..469edfd02734 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/create/SyncCreateSetEndpoint.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder().setEndpoint(myEndpoint).build(); TextToSpeechClient textToSpeechClient = TextToSpeechClient.create(textToSpeechSettings); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/AsyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/AsyncListVoices.java index 0f3a4007d553..b4cbf584181d 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/AsyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/AsyncListVoices.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListVoices() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { ListVoicesRequest request = ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoices.java index 3e34ca250d59..e11e893314a4 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoices.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { ListVoicesRequest request = ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoicesString.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoicesString.java index 02ce237ff588..ba17ff32c2bd 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoicesString.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/listvoices/SyncListVoicesString.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncListVoicesString() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { String languageCode = "languageCode-2092349083"; ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java index e15de8aae730..1f7163bbd251 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void asyncSynthesizeSpeech() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesizeSpeechRequest request = SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java index 1d127eb37d90..7076daec5895 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void syncSynthesizeSpeech() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesizeSpeechRequest request = SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java index f80442244487..9253bf7d9c88 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { public static void syncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesisInput input = SynthesisInput.newBuilder().build(); VoiceSelectionParams voice = VoiceSelectionParams.newBuilder().build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechsettings/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechsettings/listvoices/SyncListVoices.java index c81b5f3e81b2..daa8f85cb51d 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechsettings/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1/texttospeechsettings/listvoices/SyncListVoices.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 TextToSpeechSettings.Builder textToSpeechSettingsBuilder = TextToSpeechSettings.newBuilder(); textToSpeechSettingsBuilder .listVoicesSettings() .setRetrySettings( - textToSpeechSettingsBuilder - .listVoicesSettings() - .getRetrySettings() - .toBuilder() + textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); TextToSpeechSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java index a9d70ec5a752..7dae70660b8f 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/stub/texttospeechstubsettings/listvoices/SyncListVoices.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 TextToSpeechStubSettings.Builder textToSpeechSettingsBuilder = TextToSpeechStubSettings.newBuilder(); textToSpeechSettingsBuilder .listVoicesSettings() .setRetrySettings( - textToSpeechSettingsBuilder - .listVoicesSettings() - .getRetrySettings() - .toBuilder() + textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); TextToSpeechStubSettings textToSpeechSettings = textToSpeechSettingsBuilder.build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java index 8d96df8533b5..adca0528009d 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java index fd63bdd75d86..a988d2d173d4 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetCredentialsProvider1.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder() .setTransportChannelProvider( diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetEndpoint.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetEndpoint.java index 41869be55d9b..c716c51b94dd 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/create/SyncCreateSetEndpoint.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/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 TextToSpeechSettings textToSpeechSettings = TextToSpeechSettings.newBuilder().setEndpoint(myEndpoint).build(); TextToSpeechClient textToSpeechClient = TextToSpeechClient.create(textToSpeechSettings); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/AsyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/AsyncListVoices.java index abc0e5a3f181..623607c8ae1f 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/AsyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/AsyncListVoices.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void asyncListVoices() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { ListVoicesRequest request = ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoices.java index 20c177694cb3..00bcb00bcecd 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoices.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { ListVoicesRequest request = ListVoicesRequest.newBuilder().setLanguageCode("languageCode-2092349083").build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoicesString.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoicesString.java index 778e2d8c4d6c..11ef28002489 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoicesString.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/listvoices/SyncListVoicesString.java @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception { } public static void syncListVoicesString() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { String languageCode = "languageCode-2092349083"; ListVoicesResponse response = textToSpeechClient.listVoices(languageCode); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java index 29cb05afe42b..62940ed00ec0 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/AsyncSynthesizeSpeech.java @@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception { } public static void asyncSynthesizeSpeech() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesizeSpeechRequest request = SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java index 70d1c39a05fc..6599f2826c3d 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeech.java @@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception { } public static void syncSynthesizeSpeech() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesizeSpeechRequest request = SynthesizeSpeechRequest.newBuilder() diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java index 476647bb4167..d132c1ac5704 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechclient/synthesizespeech/SyncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { public static void syncSynthesizeSpeechSynthesisinputVoiceselectionparamsAudioconfig() 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 (TextToSpeechClient textToSpeechClient = TextToSpeechClient.create()) { SynthesisInput input = SynthesisInput.newBuilder().build(); VoiceSelectionParams voice = VoiceSelectionParams.newBuilder().build(); diff --git a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechsettings/listvoices/SyncListVoices.java b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechsettings/listvoices/SyncListVoices.java index 21c84d04b41e..6642548f1970 100644 --- a/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechsettings/listvoices/SyncListVoices.java +++ b/java-texttospeech/samples/snippets/generated/com/google/cloud/texttospeech/v1beta1/texttospeechsettings/listvoices/SyncListVoices.java @@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception { } public static void syncListVoices() 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 TextToSpeechSettings.Builder textToSpeechSettingsBuilder = TextToSpeechSettings.newBuilder(); textToSpeechSettingsBuilder .listVoicesSettings() .setRetrySettings( - textToSpeechSettingsBuilder - .listVoicesSettings() - .getRetrySettings() - .toBuilder() + textToSpeechSettingsBuilder.listVoicesSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); TextToSpeechSettings textToSpeechSettings = textToSpeechSettingsBuilder.build();