{@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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); @@ -71,8 +74,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -84,8 +90,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); * LanguageServiceClient languageServiceClient = @@ -96,8 +105,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder() * .setTransportChannelProvider( @@ -166,8 +178,11 @@ public LanguageServiceStub 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); @@ -190,8 +205,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -221,8 +239,11 @@ public final AnalyzeSentimentResponse analyzeSentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSentimentRequest request = * AnalyzeSentimentRequest.newBuilder() @@ -247,8 +268,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSentimentRequest request = * AnalyzeSentimentRequest.newBuilder() @@ -275,8 +299,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); @@ -300,8 +327,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -332,8 +362,11 @@ public final AnalyzeEntitiesResponse analyzeEntities( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitiesRequest request = * AnalyzeEntitiesRequest.newBuilder() @@ -359,8 +392,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitiesRequest request = * AnalyzeEntitiesRequest.newBuilder() @@ -388,8 +424,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeEntitySentimentResponse response = @@ -415,8 +454,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment(Document docu *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -448,8 +490,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitySentimentRequest request = * AnalyzeEntitySentimentRequest.newBuilder() @@ -478,8 +523,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitySentimentRequest request = * AnalyzeEntitySentimentRequest.newBuilder() @@ -506,8 +554,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); @@ -530,8 +581,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -560,8 +614,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(Document document, EncodingType *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSyntaxRequest request = * AnalyzeSyntaxRequest.newBuilder() @@ -587,8 +644,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(AnalyzeSyntaxRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSyntaxRequest request = * AnalyzeSyntaxRequest.newBuilder() @@ -613,8 +673,11 @@ public final UnaryCallableanalyzeS * 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * ClassifyTextResponse response = languageServiceClient.classifyText(document); @@ -636,8 +699,11 @@ public final ClassifyTextResponse classifyText(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * ClassifyTextRequest request = * ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); @@ -659,8 +725,11 @@ public final ClassifyTextResponse classifyText(ClassifyTextRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * ClassifyTextRequest request = * ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); @@ -683,8 +752,11 @@ public final UnaryCallableclassifyTe * 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); @@ -711,8 +783,11 @@ public final AnnotateTextResponse annotateText( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); @@ -746,8 +821,11 @@ public final AnnotateTextResponse annotateText( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnnotateTextRequest request = * AnnotateTextRequest.newBuilder() @@ -774,8 +852,11 @@ public final AnnotateTextResponse annotateText(AnnotateTextRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnnotateTextRequest request = * AnnotateTextRequest.newBuilder() diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceSettings.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceSettings.java index 30e6a07e..ddb085e7 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceSettings.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1/LanguageServiceSettings.java @@ -50,17 +50,17 @@ *For example, to set the total timeout of analyzeSentiment 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 * LanguageServiceSettings.Builder languageServiceSettingsBuilder = * LanguageServiceSettings.newBuilder(); * languageServiceSettingsBuilder * .analyzeSentimentSettings() * .setRetrySettings( - * languageServiceSettingsBuilder - * .analyzeSentimentSettings() - * .getRetrySettings() - * .toBuilder() + * languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1/package-info.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1/package-info.java index 6f13ad8e..5d1efcb4 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1/package-info.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1/package-info.java @@ -25,8 +25,11 @@ *Sample for LanguageServiceClient: * *
{@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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/HttpJsonLanguageServiceStub.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/HttpJsonLanguageServiceStub.java index a7472b01..7956fe99 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/HttpJsonLanguageServiceStub.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/HttpJsonLanguageServiceStub.java @@ -85,7 +85,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -119,7 +120,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -155,7 +157,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -189,7 +192,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -223,7 +227,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -257,7 +262,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/LanguageServiceStubSettings.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/LanguageServiceStubSettings.java index 8ac845b3..2b662592 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/LanguageServiceStubSettings.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1/stub/LanguageServiceStubSettings.java @@ -73,17 +73,17 @@ * For example, to set the total timeout of analyzeSentiment 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 * LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = * LanguageServiceStubSettings.newBuilder(); * languageServiceSettingsBuilder * .analyzeSentimentSettings() * .setRetrySettings( - * languageServiceSettingsBuilder - * .analyzeSentimentSettings() - * .getRetrySettings() - * .toBuilder() + * languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java index dd0d7a07..e887f23b 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java @@ -34,8 +34,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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); @@ -72,8 +75,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder() * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) @@ -85,8 +91,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); * LanguageServiceClient languageServiceClient = @@ -97,8 +106,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 * LanguageServiceSettings languageServiceSettings = * LanguageServiceSettings.newBuilder() * .setTransportChannelProvider( @@ -168,8 +180,11 @@ public LanguageServiceStub 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); @@ -192,8 +207,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -224,8 +242,11 @@ public final AnalyzeSentimentResponse analyzeSentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSentimentRequest request = * AnalyzeSentimentRequest.newBuilder() @@ -250,8 +271,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSentimentRequest request = * AnalyzeSentimentRequest.newBuilder() @@ -278,8 +302,11 @@ public final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); @@ -303,8 +330,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -335,8 +365,11 @@ public final AnalyzeEntitiesResponse analyzeEntities( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitiesRequest request = * AnalyzeEntitiesRequest.newBuilder() @@ -362,8 +395,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitiesRequest request = * AnalyzeEntitiesRequest.newBuilder() @@ -391,8 +427,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeEntitySentimentResponse response = @@ -418,8 +457,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment(Document docu *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -451,8 +493,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitySentimentRequest request = * AnalyzeEntitySentimentRequest.newBuilder() @@ -481,8 +526,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeEntitySentimentRequest request = * AnalyzeEntitySentimentRequest.newBuilder() @@ -509,8 +557,11 @@ public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); @@ -533,8 +584,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * EncodingType encodingType = EncodingType.forNumber(0); @@ -563,8 +617,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(Document document, EncodingType *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSyntaxRequest request = * AnalyzeSyntaxRequest.newBuilder() @@ -590,8 +647,11 @@ public final AnalyzeSyntaxResponse analyzeSyntax(AnalyzeSyntaxRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnalyzeSyntaxRequest request = * AnalyzeSyntaxRequest.newBuilder() @@ -616,8 +676,11 @@ public final UnaryCallableanalyzeS * 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * ClassifyTextResponse response = languageServiceClient.classifyText(document); @@ -639,8 +702,11 @@ public final ClassifyTextResponse classifyText(Document document) { *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * ClassifyTextRequest request = * ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); @@ -662,8 +728,11 @@ public final ClassifyTextResponse classifyText(ClassifyTextRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * ClassifyTextRequest request = * ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); @@ -686,8 +755,11 @@ public final UnaryCallableclassifyTe * 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); @@ -714,8 +786,11 @@ public final AnnotateTextResponse annotateText( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); @@ -749,8 +824,11 @@ public final AnnotateTextResponse annotateText( *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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnnotateTextRequest request = * AnnotateTextRequest.newBuilder() @@ -777,8 +855,11 @@ public final AnnotateTextResponse annotateText(AnnotateTextRequest 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * AnnotateTextRequest request = * AnnotateTextRequest.newBuilder() diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceSettings.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceSettings.java index 1bef411b..5d2d0dbb 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceSettings.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceSettings.java @@ -50,17 +50,17 @@ *For example, to set the total timeout of analyzeSentiment 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 * LanguageServiceSettings.Builder languageServiceSettingsBuilder = * LanguageServiceSettings.newBuilder(); * languageServiceSettingsBuilder * .analyzeSentimentSettings() * .setRetrySettings( - * languageServiceSettingsBuilder - * .analyzeSentimentSettings() - * .getRetrySettings() - * .toBuilder() + * languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/package-info.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/package-info.java index 00cfffea..8d011841 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/package-info.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/package-info.java @@ -25,8 +25,11 @@ *Sample for LanguageServiceClient: * *
{@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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { * Document document = Document.newBuilder().build(); * AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/HttpJsonLanguageServiceStub.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/HttpJsonLanguageServiceStub.java index 1630211e..f177a261 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/HttpJsonLanguageServiceStub.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/HttpJsonLanguageServiceStub.java @@ -85,7 +85,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -119,7 +120,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -156,7 +158,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -190,7 +193,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -224,7 +228,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() @@ -258,7 +263,8 @@ public class HttpJsonLanguageServiceStub extends LanguageServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser. newBuilder() diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/LanguageServiceStubSettings.java b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/LanguageServiceStubSettings.java index 721185c0..ea0e4565 100644 --- a/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/LanguageServiceStubSettings.java +++ b/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/stub/LanguageServiceStubSettings.java @@ -73,17 +73,17 @@ * For example, to set the total timeout of analyzeSentiment 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 * LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = * LanguageServiceStubSettings.newBuilder(); * languageServiceSettingsBuilder * .analyzeSentimentSettings() * .setRetrySettings( - * languageServiceSettingsBuilder - * .analyzeSentimentSettings() - * .getRetrySettings() - * .toBuilder() + * languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() * .setTotalTimeout(Duration.ofSeconds(30)) * .build()); * LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/grpc-google-cloud-language-v1/pom.xml b/grpc-google-cloud-language-v1/pom.xml index f622b479..555a08b2 100644 --- a/grpc-google-cloud-language-v1/pom.xml +++ b/grpc-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@4.0.0 com.google.api.grpc grpc-google-cloud-language-v1 -2.3.3 +2.3.4 grpc-google-cloud-language-v1 GRPC library for grpc-google-cloud-language-v1 com.google.cloud google-cloud-language-parent -2.3.3 +2.3.4 diff --git a/grpc-google-cloud-language-v1beta2/pom.xml b/grpc-google-cloud-language-v1beta2/pom.xml index f719a69b..9261d500 100644 --- a/grpc-google-cloud-language-v1beta2/pom.xml +++ b/grpc-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-language-v1beta2 -0.90.3 +0.90.4 grpc-google-cloud-language-v1beta2 GRPC library for grpc-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent -2.3.3 +2.3.4 diff --git a/pom.xml b/pom.xml index 197b1090..3bda1579 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-language-parent pom -2.3.3 +2.3.4 Google Cloud Natural Language Parent https://github.com/googleapis/java-language @@ -61,33 +61,33 @@ com.google.api.grpc proto-google-cloud-language-v1 -2.3.3 +2.3.4 com.google.api.grpc proto-google-cloud-language-v1beta2 -0.90.3 +0.90.4 com.google.api.grpc grpc-google-cloud-language-v1 -2.3.3 +2.3.4 com.google.api.grpc grpc-google-cloud-language-v1beta2 -0.90.3 +0.90.4 com.google.cloud google-cloud-language -2.3.3 +2.3.4 diff --git a/proto-google-cloud-language-v1/pom.xml b/proto-google-cloud-language-v1/pom.xml index 5bd65cf2..d6a336f6 100644 --- a/proto-google-cloud-language-v1/pom.xml +++ b/proto-google-cloud-language-v1/pom.xml @@ -4,13 +4,13 @@ com.google.cloud google-cloud-shared-dependencies -3.0.2 +3.0.3 pom import 4.0.0 com.google.api.grpc proto-google-cloud-language-v1 -2.3.3 +2.3.4 proto-google-cloud-language-v1 PROTO library for proto-google-cloud-language-v1 com.google.cloud google-cloud-language-parent -2.3.3 +2.3.4 diff --git a/proto-google-cloud-language-v1beta2/pom.xml b/proto-google-cloud-language-v1beta2/pom.xml index b20282c7..61f12968 100644 --- a/proto-google-cloud-language-v1beta2/pom.xml +++ b/proto-google-cloud-language-v1beta2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-language-v1beta2 -0.90.3 +0.90.4 proto-google-cloud-language-v1beta2 PROTO library for proto-google-cloud-language-v1beta2 com.google.cloud google-cloud-language-parent -2.3.3 +2.3.4 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ad2c5a93..b04d2dce 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index db48c087..7e94ca17 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-language -2.3.2 +2.3.3 com.google.cloud google-cloud-language -2.3.2 +2.3.3 diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java index c5dcde02..f35e1201 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeEntities() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java index 647da31d..1b641f00 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntities() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java index 6979956c..7c06cfc8 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitiesDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java index c0c55004..c249d1b4 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitiesDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java index 0b0c3d03..771ae366 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeEntitySentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitySentimentRequest request = AnalyzeEntitySentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java index 81ea2d78..00e55c62 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitySentimentRequest request = AnalyzeEntitySentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java index a5c73d8a..fc6505eb 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentimentDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeEntitySentimentResponse response = diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java index f31ef23e..4bd8bbd3 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentimentDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java index 0e5cd648..1224abdd 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeSentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSentimentRequest request = AnalyzeSentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java index 8b19f3ee..fc5b5f9f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSentimentRequest request = AnalyzeSentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java index faaf05a0..5fc0ab6b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentimentDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java index 3b2c8764..9baa8e4f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentimentDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java index d5a7a3f5..ea72f04b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeSyntax() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java index 52acf866..34e80427 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntax() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java index 8fdcce26..282e8557 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntaxDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java index 3f461876..fdeab0b6 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntaxDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java index e68d89cd..8bcc06e7 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/AsyncAnnotateText.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnnotateText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java index 197561c1..47245674 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateText.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnnotateText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java index 8415a8f0..b78e84ad 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnnotateTextDocumentAnnotatetextrequestfeatures() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java index 477c4b81..261a6b4d 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { public static void syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java index f32f5513..def8f6a5 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/AsyncClassifyText.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncClassifyText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java index 71cc2b42..5e68d26b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyText.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncClassifyText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java index dc264b7b..93665252 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/classifytext/SyncClassifyTextDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncClassifyTextDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); ClassifyTextResponse response = languageServiceClient.classifyText(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java index 5affb679..8e0ac427 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java index 5557835f..3ad70bd4 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder() .setTransportChannelProvider( diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java index e24ecbe8..bc6d0712 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); LanguageServiceClient languageServiceClient = diff --git a/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java index 00da3016..b1989ce7 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 LanguageServiceSettings.Builder languageServiceSettingsBuilder = LanguageServiceSettings.newBuilder(); languageServiceSettingsBuilder .analyzeSentimentSettings() .setRetrySettings( - languageServiceSettingsBuilder - .analyzeSentimentSettings() - .getRetrySettings() - .toBuilder() + languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java index bee72673..08acbeda 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = LanguageServiceStubSettings.newBuilder(); languageServiceSettingsBuilder .analyzeSentimentSettings() .setRetrySettings( - languageServiceSettingsBuilder - .analyzeSentimentSettings() - .getRetrySettings() - .toBuilder() + languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java index 428a0a5a..1a1f9409 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/AsyncAnalyzeEntities.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeEntities() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java index a9f9c8e9..901012a5 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntities.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntities() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitiesRequest request = AnalyzeEntitiesRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java index 51684990..f08af4b7 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitiesDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeEntitiesResponse response = languageServiceClient.analyzeEntities(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java index 5683d97c..89bc7669 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentities/SyncAnalyzeEntitiesDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitiesDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java index fa5214d0..3b053866 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/AsyncAnalyzeEntitySentiment.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeEntitySentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitySentimentRequest request = AnalyzeEntitySentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java index 0c934d0b..baf5711f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentiment.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeEntitySentimentRequest request = AnalyzeEntitySentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java index d2aaf663..2df99ec2 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentimentDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeEntitySentimentResponse response = diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java index 42c2975a..3bfbf272 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzeentitysentiment/SyncAnalyzeEntitySentimentDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeEntitySentimentDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java index 4ec820fc..aeb1e8ae 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/AsyncAnalyzeSentiment.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeSentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSentimentRequest request = AnalyzeSentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java index 19ee4b84..4c5f7e4e 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentiment.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSentimentRequest request = AnalyzeSentimentRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java index 6948b78e..bbc5d8c2 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentimentDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeSentimentResponse response = languageServiceClient.analyzeSentiment(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java index c3047b32..cb710a70 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesentiment/SyncAnalyzeSentimentDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentimentDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java index 5503e6f9..f5eee930 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/AsyncAnalyzeSyntax.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnalyzeSyntax() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java index 688674a0..9254f4a5 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntax.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntax() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java index a705cede..2332236d 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntaxDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnalyzeSyntaxResponse response = languageServiceClient.analyzeSyntax(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java index d420702b..ebc18f5a 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/analyzesyntax/SyncAnalyzeSyntaxDocumentEncodingtype.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSyntaxDocumentEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); EncodingType encodingType = EncodingType.forNumber(0); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java index ebf89288..3d38a4d9 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/AsyncAnnotateText.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { } public static void asyncAnnotateText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java index 78134bec..078c2aec 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateText.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnnotateText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { AnnotateTextRequest request = AnnotateTextRequest.newBuilder() diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java index 733b06cb..fdefd09b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeatures.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncAnnotateTextDocumentAnnotatetextrequestfeatures() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java index 290af5fb..8087f31b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/annotatetext/SyncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype.java @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception { public static void syncAnnotateTextDocumentAnnotatetextrequestfeaturesEncodingtype() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); AnnotateTextRequest.Features features = AnnotateTextRequest.Features.newBuilder().build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java index 273de85b..ab9f2a1f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/AsyncClassifyText.java @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception { } public static void asyncClassifyText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java index c6576356..11f02cd0 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyText.java @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception { } public static void syncClassifyText() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { ClassifyTextRequest request = ClassifyTextRequest.newBuilder().setDocument(Document.newBuilder().build()).build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java index 49d3ea34..94af5ca8 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/classifytext/SyncClassifyTextDocument.java @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception { } public static void syncClassifyTextDocument() 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 (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); ClassifyTextResponse response = languageServiceClient.classifyText(document); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java index 93b53187..bddd0d4f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder() .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java index f156c764..5da25c5b 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder() .setTransportChannelProvider( diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java index 39c2bd73..b8feb4d3 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageserviceclient/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 LanguageServiceSettings languageServiceSettings = LanguageServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); LanguageServiceClient languageServiceClient = diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java index d5d64abf..95c191fe 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/languageservicesettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 LanguageServiceSettings.Builder languageServiceSettingsBuilder = LanguageServiceSettings.newBuilder(); languageServiceSettingsBuilder .analyzeSentimentSettings() .setRetrySettings( - languageServiceSettingsBuilder - .analyzeSentimentSettings() - .getRetrySettings() - .toBuilder() + languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); LanguageServiceSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java b/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java index 90bf72ce..bd35369f 100644 --- a/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java +++ b/samples/snippets/generated/com/google/cloud/language/v1beta2/stub/languageservicestubsettings/analyzesentiment/SyncAnalyzeSentiment.java @@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception { } public static void syncAnalyzeSentiment() 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 LanguageServiceStubSettings.Builder languageServiceSettingsBuilder = LanguageServiceStubSettings.newBuilder(); languageServiceSettingsBuilder .analyzeSentimentSettings() .setRetrySettings( - languageServiceSettingsBuilder - .analyzeSentimentSettings() - .getRetrySettings() - .toBuilder() + languageServiceSettingsBuilder.analyzeSentimentSettings().getRetrySettings().toBuilder() .setTotalTimeout(Duration.ofSeconds(30)) .build()); LanguageServiceStubSettings languageServiceSettings = languageServiceSettingsBuilder.build(); diff --git a/versions.txt b/versions.txt index 887e360a..7559c6cb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-language:2.3.3:2.3.3 -grpc-google-cloud-language-v1:2.3.3:2.3.3 -grpc-google-cloud-language-v1beta2:0.90.3:0.90.3 -proto-google-cloud-language-v1:2.3.3:2.3.3 -proto-google-cloud-language-v1beta2:0.90.3:0.90.3 +google-cloud-language:2.3.4:2.3.4 +grpc-google-cloud-language-v1:2.3.4:2.3.4 +grpc-google-cloud-language-v1beta2:0.90.4:0.90.4 +proto-google-cloud-language-v1:2.3.4:2.3.4 +proto-google-cloud-language-v1beta2:0.90.4:0.90.4