diff --git a/README.md b/README.md index 688b678e..0453709c 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,13 @@ implementation 'com.google.cloud:google-cloud-translate' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-translate:2.1.6' +implementation 'com.google.cloud:google-cloud-translate:2.1.7' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.1.6" +libraryDependencies += "com.google.cloud" % "google-cloud-translate" % "2.1.7" ``` ## Authentication diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java index 81e5f3db..bec83605 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java @@ -913,6 +913,130 @@ public final UnaryCallable batchTranslateT return stub.batchTranslateTextCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates a large volume of document in asynchronous batch mode. This function provides + * real-time output as the inputs are being processed. If caller cancels a request, the partial + * results (for an input file, it's all or nothing) may still be available on the specified output + * location. + * + *

This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *

Sample code: + * + *

{@code
+   * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String sourceLanguageCode = "sourceLanguageCode1645917472";
+   *   List targetLanguageCodes = new ArrayList<>();
+   *   List inputConfigs = new ArrayList<>();
+   *   BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build();
+   *   BatchTranslateDocumentResponse response =
+   *       translationServiceClient
+   *           .batchTranslateDocumentAsync(
+   *               parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location to make a regional call. + *

Format: `projects/{project-number-or-id}/locations/{location-id}`. + *

The `global` location is not supported for batch translation. + *

Only AutoML Translation models or glossaries within the same region (have the same + * location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. + * @param sourceLanguageCode Required. The BCP-47 language code of the input document if known, + * for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support + * (https://cloud.google.com/translate/docs/languages). + * @param targetLanguageCodes Required. The BCP-47 language code to use for translation of the + * input document. Specify up to 10 language codes here. + * @param inputConfigs Required. Input configurations. The total number of files matched should be + * <= 100. The total content size to translate should be <= 100M Unicode codepoints. The + * files must use UTF-8 encoding. + * @param outputConfig Required. Output configuration. If 2 input configs match to the same file + * (that is, same input path), we don't generate output for duplicate inputs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchTranslateDocumentAsync( + LocationName parent, + String sourceLanguageCode, + List targetLanguageCodes, + List inputConfigs, + BatchDocumentOutputConfig outputConfig) { + BatchTranslateDocumentRequest request = + BatchTranslateDocumentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceLanguageCode(sourceLanguageCode) + .addAllTargetLanguageCodes(targetLanguageCodes) + .addAllInputConfigs(inputConfigs) + .setOutputConfig(outputConfig) + .build(); + return batchTranslateDocumentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates a large volume of document in asynchronous batch mode. This function provides + * real-time output as the inputs are being processed. If caller cancels a request, the partial + * results (for an input file, it's all or nothing) may still be available on the specified output + * location. + * + *

This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *

Sample code: + * + *

{@code
+   * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String sourceLanguageCode = "sourceLanguageCode1645917472";
+   *   List targetLanguageCodes = new ArrayList<>();
+   *   List inputConfigs = new ArrayList<>();
+   *   BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build();
+   *   BatchTranslateDocumentResponse response =
+   *       translationServiceClient
+   *           .batchTranslateDocumentAsync(
+   *               parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location to make a regional call. + *

Format: `projects/{project-number-or-id}/locations/{location-id}`. + *

The `global` location is not supported for batch translation. + *

Only AutoML Translation models or glossaries within the same region (have the same + * location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. + * @param sourceLanguageCode Required. The BCP-47 language code of the input document if known, + * for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support + * (https://cloud.google.com/translate/docs/languages). + * @param targetLanguageCodes Required. The BCP-47 language code to use for translation of the + * input document. Specify up to 10 language codes here. + * @param inputConfigs Required. Input configurations. The total number of files matched should be + * <= 100. The total content size to translate should be <= 100M Unicode codepoints. The + * files must use UTF-8 encoding. + * @param outputConfig Required. Output configuration. If 2 input configs match to the same file + * (that is, same input path), we don't generate output for duplicate inputs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchTranslateDocumentAsync( + String parent, + String sourceLanguageCode, + List targetLanguageCodes, + List inputConfigs, + BatchDocumentOutputConfig outputConfig) { + BatchTranslateDocumentRequest request = + BatchTranslateDocumentRequest.newBuilder() + .setParent(parent) + .setSourceLanguageCode(sourceLanguageCode) + .addAllTargetLanguageCodes(targetLanguageCodes) + .addAllInputConfigs(inputConfigs) + .setOutputConfig(outputConfig) + .build(); + return batchTranslateDocumentAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Translates a large volume of document in asynchronous batch mode. This function provides diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/gapic_metadata.json b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/gapic_metadata.json index 0088a1f0..b5190737 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/gapic_metadata.json +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/gapic_metadata.json @@ -11,7 +11,7 @@ "libraryClient": "TranslationServiceClient", "rpcs": { "BatchTranslateDocument": { - "methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"] + "methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"] }, "BatchTranslateText": { "methods": ["batchTranslateTextAsync", "batchTranslateTextOperationCallable", "batchTranslateTextCallable"] diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceClient.java b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceClient.java index 6aa588e2..b9cccb10 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceClient.java +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceClient.java @@ -692,6 +692,130 @@ public final UnaryCallable batchTranslateT return stub.batchTranslateTextCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates a large volume of documents in asynchronous batch mode. This function provides + * real-time output as the inputs are being processed. If caller cancels a request, the partial + * results (for an input file, it's all or nothing) may still be available on the specified output + * location. + * + *

This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *

Sample code: + * + *

{@code
+   * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String sourceLanguageCode = "sourceLanguageCode1645917472";
+   *   List targetLanguageCodes = new ArrayList<>();
+   *   List inputConfigs = new ArrayList<>();
+   *   BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build();
+   *   BatchTranslateDocumentResponse response =
+   *       translationServiceClient
+   *           .batchTranslateDocumentAsync(
+   *               parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location to make a regional call. + *

Format: `projects/{project-number-or-id}/locations/{location-id}`. + *

The `global` location is not supported for batch translation. + *

Only AutoML Translation models or glossaries within the same region (have the same + * location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. + * @param sourceLanguageCode Required. The BCP-47 language code of the input document if known, + * for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support + * (https://cloud.google.com/translate/docs/languages). + * @param targetLanguageCodes Required. The BCP-47 language code to use for translation of the + * input document. Specify up to 10 language codes here. + * @param inputConfigs Required. Input configurations. The total number of files matched should be + * <= 100. The total content size to translate should be <= 100M Unicode codepoints. The + * files must use UTF-8 encoding. + * @param outputConfig Required. Output configuration. If 2 input configs match to the same file + * (that is, same input path), we don't generate output for duplicate inputs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchTranslateDocumentAsync( + LocationName parent, + String sourceLanguageCode, + List targetLanguageCodes, + List inputConfigs, + BatchDocumentOutputConfig outputConfig) { + BatchTranslateDocumentRequest request = + BatchTranslateDocumentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceLanguageCode(sourceLanguageCode) + .addAllTargetLanguageCodes(targetLanguageCodes) + .addAllInputConfigs(inputConfigs) + .setOutputConfig(outputConfig) + .build(); + return batchTranslateDocumentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates a large volume of documents in asynchronous batch mode. This function provides + * real-time output as the inputs are being processed. If caller cancels a request, the partial + * results (for an input file, it's all or nothing) may still be available on the specified output + * location. + * + *

This call returns immediately and you can use google.longrunning.Operation.name to poll the + * status of the call. + * + *

Sample code: + * + *

{@code
+   * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String sourceLanguageCode = "sourceLanguageCode1645917472";
+   *   List targetLanguageCodes = new ArrayList<>();
+   *   List inputConfigs = new ArrayList<>();
+   *   BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build();
+   *   BatchTranslateDocumentResponse response =
+   *       translationServiceClient
+   *           .batchTranslateDocumentAsync(
+   *               parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location to make a regional call. + *

Format: `projects/{project-number-or-id}/locations/{location-id}`. + *

The `global` location is not supported for batch translation. + *

Only AutoML Translation models or glossaries within the same region (have the same + * location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. + * @param sourceLanguageCode Required. The BCP-47 language code of the input document if known, + * for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support + * (https://cloud.google.com/translate/docs/languages). + * @param targetLanguageCodes Required. The BCP-47 language code to use for translation of the + * input document. Specify up to 10 language codes here. + * @param inputConfigs Required. Input configurations. The total number of files matched should be + * <= 100. The total content size to translate should be <= 100M Unicode codepoints. The + * files must use UTF-8 encoding. + * @param outputConfig Required. Output configuration. If 2 input configs match to the same file + * (that is, same input path), we don't generate output for duplicate inputs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + batchTranslateDocumentAsync( + String parent, + String sourceLanguageCode, + List targetLanguageCodes, + List inputConfigs, + BatchDocumentOutputConfig outputConfig) { + BatchTranslateDocumentRequest request = + BatchTranslateDocumentRequest.newBuilder() + .setParent(parent) + .setSourceLanguageCode(sourceLanguageCode) + .addAllTargetLanguageCodes(targetLanguageCodes) + .addAllInputConfigs(inputConfigs) + .setOutputConfig(outputConfig) + .build(); + return batchTranslateDocumentAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Translates a large volume of documents in asynchronous batch mode. This function provides diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/gapic_metadata.json b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/gapic_metadata.json index e5db2b0a..5cf5bb90 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/gapic_metadata.json +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/gapic_metadata.json @@ -11,7 +11,7 @@ "libraryClient": "TranslationServiceClient", "rpcs": { "BatchTranslateDocument": { - "methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"] + "methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"] }, "BatchTranslateText": { "methods": ["batchTranslateTextAsync", "batchTranslateTextOperationCallable", "batchTranslateTextCallable"] diff --git a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/TranslationServiceClientTest.java b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/TranslationServiceClientTest.java index 65a201ce..28a2fe30 100644 --- a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/TranslationServiceClientTest.java +++ b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3/TranslationServiceClientTest.java @@ -642,20 +642,17 @@ public void batchTranslateDocumentTest() throws Exception { .build(); mockTranslationService.addResponse(resultOperation); - BatchTranslateDocumentRequest request = - BatchTranslateDocumentRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setSourceLanguageCode("sourceLanguageCode1645917472") - .addAllTargetLanguageCodes(new ArrayList()) - .addAllInputConfigs(new ArrayList()) - .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) - .putAllModels(new HashMap()) - .putAllGlossaries(new HashMap()) - .putAllFormatConversions(new HashMap()) - .build(); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); BatchTranslateDocumentResponse actualResponse = - client.batchTranslateDocumentAsync(request).get(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockTranslationService.getRequests(); @@ -663,15 +660,11 @@ public void batchTranslateDocumentTest() throws Exception { BatchTranslateDocumentRequest actualRequest = ((BatchTranslateDocumentRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getSourceLanguageCode(), actualRequest.getSourceLanguageCode()); - Assert.assertEquals( - request.getTargetLanguageCodesList(), actualRequest.getTargetLanguageCodesList()); - Assert.assertEquals(request.getInputConfigsList(), actualRequest.getInputConfigsList()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertEquals(request.getModelsMap(), actualRequest.getModelsMap()); - Assert.assertEquals(request.getGlossariesMap(), actualRequest.getGlossariesMap()); - Assert.assertEquals(request.getFormatConversionsMap(), actualRequest.getFormatConversionsMap()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceLanguageCode, actualRequest.getSourceLanguageCode()); + Assert.assertEquals(targetLanguageCodes, actualRequest.getTargetLanguageCodesList()); + Assert.assertEquals(inputConfigs, actualRequest.getInputConfigsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -684,18 +677,90 @@ public void batchTranslateDocumentExceptionTest() throws Exception { mockTranslationService.addException(exception); try { - BatchTranslateDocumentRequest request = - BatchTranslateDocumentRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setSourceLanguageCode("sourceLanguageCode1645917472") - .addAllTargetLanguageCodes(new ArrayList()) - .addAllInputConfigs(new ArrayList()) - .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) - .putAllModels(new HashMap()) - .putAllGlossaries(new HashMap()) - .putAllFormatConversions(new HashMap()) - .build(); - client.batchTranslateDocumentAsync(request).get(); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void batchTranslateDocumentTest2() throws Exception { + BatchTranslateDocumentResponse expectedResponse = + BatchTranslateDocumentResponse.newBuilder() + .setTotalPages(-396186871) + .setTranslatedPages(-1652747493) + .setFailedPages(-2002254526) + .setTotalBillablePages(1292117569) + .setTotalCharacters(-1368640955) + .setTranslatedCharacters(-1337326221) + .setFailedCharacters(1723028396) + .setTotalBillableCharacters(1242495501) + .setSubmitTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchTranslateDocumentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTranslationService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + + BatchTranslateDocumentResponse actualResponse = + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTranslationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchTranslateDocumentRequest actualRequest = + ((BatchTranslateDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceLanguageCode, actualRequest.getSourceLanguageCode()); + Assert.assertEquals(targetLanguageCodes, actualRequest.getTargetLanguageCodesList()); + Assert.assertEquals(inputConfigs, actualRequest.getInputConfigsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchTranslateDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTranslationService.addException(exception); + + try { + String parent = "parent-995424086"; + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); diff --git a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3beta1/TranslationServiceClientTest.java b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3beta1/TranslationServiceClientTest.java index c68eaa0e..2a0bcd33 100644 --- a/google-cloud-translate/src/test/java/com/google/cloud/translate/v3beta1/TranslationServiceClientTest.java +++ b/google-cloud-translate/src/test/java/com/google/cloud/translate/v3beta1/TranslationServiceClientTest.java @@ -496,20 +496,17 @@ public void batchTranslateDocumentTest() throws Exception { .build(); mockTranslationService.addResponse(resultOperation); - BatchTranslateDocumentRequest request = - BatchTranslateDocumentRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setSourceLanguageCode("sourceLanguageCode1645917472") - .addAllTargetLanguageCodes(new ArrayList()) - .addAllInputConfigs(new ArrayList()) - .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) - .putAllModels(new HashMap()) - .putAllGlossaries(new HashMap()) - .putAllFormatConversions(new HashMap()) - .build(); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); BatchTranslateDocumentResponse actualResponse = - client.batchTranslateDocumentAsync(request).get(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockTranslationService.getRequests(); @@ -517,15 +514,11 @@ public void batchTranslateDocumentTest() throws Exception { BatchTranslateDocumentRequest actualRequest = ((BatchTranslateDocumentRequest) actualRequests.get(0)); - Assert.assertEquals(request.getParent(), actualRequest.getParent()); - Assert.assertEquals(request.getSourceLanguageCode(), actualRequest.getSourceLanguageCode()); - Assert.assertEquals( - request.getTargetLanguageCodesList(), actualRequest.getTargetLanguageCodesList()); - Assert.assertEquals(request.getInputConfigsList(), actualRequest.getInputConfigsList()); - Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig()); - Assert.assertEquals(request.getModelsMap(), actualRequest.getModelsMap()); - Assert.assertEquals(request.getGlossariesMap(), actualRequest.getGlossariesMap()); - Assert.assertEquals(request.getFormatConversionsMap(), actualRequest.getFormatConversionsMap()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceLanguageCode, actualRequest.getSourceLanguageCode()); + Assert.assertEquals(targetLanguageCodes, actualRequest.getTargetLanguageCodesList()); + Assert.assertEquals(inputConfigs, actualRequest.getInputConfigsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -538,18 +531,90 @@ public void batchTranslateDocumentExceptionTest() throws Exception { mockTranslationService.addException(exception); try { - BatchTranslateDocumentRequest request = - BatchTranslateDocumentRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setSourceLanguageCode("sourceLanguageCode1645917472") - .addAllTargetLanguageCodes(new ArrayList()) - .addAllInputConfigs(new ArrayList()) - .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) - .putAllModels(new HashMap()) - .putAllGlossaries(new HashMap()) - .putAllFormatConversions(new HashMap()) - .build(); - client.batchTranslateDocumentAsync(request).get(); + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void batchTranslateDocumentTest2() throws Exception { + BatchTranslateDocumentResponse expectedResponse = + BatchTranslateDocumentResponse.newBuilder() + .setTotalPages(-396186871) + .setTranslatedPages(-1652747493) + .setFailedPages(-2002254526) + .setTotalBillablePages(1292117569) + .setTotalCharacters(-1368640955) + .setTranslatedCharacters(-1337326221) + .setFailedCharacters(1723028396) + .setTotalBillableCharacters(1242495501) + .setSubmitTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchTranslateDocumentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTranslationService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + + BatchTranslateDocumentResponse actualResponse = + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTranslationService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchTranslateDocumentRequest actualRequest = + ((BatchTranslateDocumentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceLanguageCode, actualRequest.getSourceLanguageCode()); + Assert.assertEquals(targetLanguageCodes, actualRequest.getTargetLanguageCodesList()); + Assert.assertEquals(inputConfigs, actualRequest.getInputConfigsList()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchTranslateDocumentExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTranslationService.addException(exception); + + try { + String parent = "parent-995424086"; + String sourceLanguageCode = "sourceLanguageCode1645917472"; + List targetLanguageCodes = new ArrayList<>(); + List inputConfigs = new ArrayList<>(); + BatchDocumentOutputConfig outputConfig = BatchDocumentOutputConfig.newBuilder().build(); + client + .batchTranslateDocumentAsync( + parent, sourceLanguageCode, targetLanguageCodes, inputConfigs, outputConfig) + .get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java index 6b7c7e0a..df03662e 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/GetLocationRequest.java @@ -174,7 +174,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -186,7 +186,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java index e1b3af7f..7fcb20d6 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsRequest.java @@ -311,16 +311,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } unknownFields.writeTo(output); @@ -332,16 +332,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java index 8e7553c0..77ad1993 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/ListLocationsResponse.java @@ -262,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < locations_.size(); i++) { output.writeMessage(1, locations_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -277,7 +277,7 @@ public int getSerializedSize() { for (int i = 0; i < locations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java index 7b7bfc86..0288131d 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/location/Location.java @@ -482,7 +482,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -490,10 +490,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (metadata_ != null) { output.writeMessage(3, getMetadata()); } - if (!getLocationIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } unknownFields.writeTo(output); @@ -505,7 +505,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry entry : @@ -521,10 +521,10 @@ public int getSerializedSize() { if (metadata_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); } - if (!getLocationIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java index 3b92ddf5..add6a341 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateDocumentRequest.java @@ -980,10 +980,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } for (int i = 0; i < targetLanguageCodes_.size(); i++) { @@ -1013,10 +1013,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateTextRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateTextRequest.java index 986c4629..d6828204 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateTextRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchTranslateTextRequest.java @@ -951,10 +951,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } for (int i = 0; i < targetLanguageCodes_.size(); i++) { @@ -981,10 +981,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryMetadata.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryMetadata.java index 2756bd9c..29082ec1 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryMetadata.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryMetadata.java @@ -510,7 +510,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (state_ @@ -530,7 +530,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (state_ diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryRequest.java index 015b6f20..74a4df70 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/CreateGlossaryRequest.java @@ -248,7 +248,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (glossary_ != null) { @@ -263,7 +263,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (glossary_ != null) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryMetadata.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryMetadata.java index df9a2e64..bb27c1b2 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryMetadata.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryMetadata.java @@ -510,7 +510,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (state_ @@ -530,7 +530,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (state_ diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryRequest.java index d747f9d5..dac71e75 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryResponse.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryResponse.java index 80133c38..ef2fedc8 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryResponse.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DeleteGlossaryResponse.java @@ -304,7 +304,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (submitTime_ != null) { @@ -322,7 +322,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (submitTime_ != null) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectLanguageRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectLanguageRequest.java index 4904295e..4c674d9b 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectLanguageRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectLanguageRequest.java @@ -589,13 +589,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -612,13 +612,13 @@ public int getSerializedSize() { if (sourceCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); } for (java.util.Map.Entry entry : diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectedLanguage.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectedLanguage.java index 2c5e148d..19ccc370 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectedLanguage.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DetectedLanguage.java @@ -199,7 +199,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } if (confidence_ != 0F) { @@ -214,7 +214,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } if (confidence_ != 0F) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentInputConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentInputConfig.java index 4b526b2b..ef772498 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentInputConfig.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentInputConfig.java @@ -354,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 2) { output.writeMessage(2, (com.google.cloud.translate.v3.GcsSource) source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_); } unknownFields.writeTo(output); @@ -376,7 +376,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.translate.v3.GcsSource) source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentOutputConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentOutputConfig.java index 11959ae0..a6a44efb 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentOutputConfig.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentOutputConfig.java @@ -410,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.translate.v3.GcsDestination) destination_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } unknownFields.writeTo(output); @@ -427,7 +427,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.translate.v3.GcsDestination) destination_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentTranslation.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentTranslation.java index 37aa5f0a..0234b4a6 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentTranslation.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/DocumentTranslation.java @@ -309,10 +309,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < byteStreamOutputs_.size(); i++) { output.writeBytes(1, byteStreamOutputs_.get(i)); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detectedLanguageCode_); } unknownFields.writeTo(output); @@ -333,10 +333,10 @@ public int getSerializedSize() { size += dataSize; size += 1 * getByteStreamOutputsList().size(); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, detectedLanguageCode_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsDestination.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsDestination.java index 2516a54b..754e59a1 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsDestination.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsDestination.java @@ -182,7 +182,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getOutputUriPrefixBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUriPrefix_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); } unknownFields.writeTo(output); @@ -194,7 +194,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getOutputUriPrefixBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUriPrefix_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsSource.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsSource.java index 5bbedccb..adb4369b 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsSource.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GcsSource.java @@ -174,7 +174,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getInputUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); } unknownFields.writeTo(output); @@ -186,7 +186,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getInputUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetGlossaryRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetGlossaryRequest.java index b472231c..77ed251f 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetGlossaryRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetGlossaryRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetSupportedLanguagesRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetSupportedLanguagesRequest.java index d2ee8484..c892af19 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetSupportedLanguagesRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/GetSupportedLanguagesRequest.java @@ -326,13 +326,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDisplayLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); } unknownFields.writeTo(output); @@ -344,13 +344,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDisplayLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Glossary.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Glossary.java index f4a24008..26506bbb 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Glossary.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Glossary.java @@ -479,10 +479,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetLanguageCode_); } unknownFields.writeTo(output); @@ -494,10 +494,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetLanguageCode_); } size += unknownFields.getSerializedSize(); @@ -2275,7 +2275,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (languagesCase_ == 3) { @@ -2305,7 +2305,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (languagesCase_ == 3) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/InputConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/InputConfig.java index 13dfb17e..be847355 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/InputConfig.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/InputConfig.java @@ -336,7 +336,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); } if (sourceCase_ == 2) { @@ -351,7 +351,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); } if (sourceCase_ == 2) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesRequest.java index e3ad011f..2660b0f7 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesRequest.java @@ -352,16 +352,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } unknownFields.writeTo(output); @@ -373,16 +373,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesResponse.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesResponse.java index 5bc3d06d..3576e266 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesResponse.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/ListGlossariesResponse.java @@ -266,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < glossaries_.size(); i++) { output.writeMessage(1, glossaries_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -281,7 +281,7 @@ public int getSerializedSize() { for (int i = 0; i < glossaries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, glossaries_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/SupportedLanguage.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/SupportedLanguage.java index 659fe6d8..5566dc4e 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/SupportedLanguage.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/SupportedLanguage.java @@ -286,10 +286,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (supportSource_ != false) { @@ -307,10 +307,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (supportSource_ != false) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java index 42c40916..6eaf74e6 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java @@ -766,13 +766,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetLanguageCode_); } if (documentInputConfig_ != null) { @@ -781,7 +781,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (documentOutputConfig_ != null) { output.writeMessage(5, getDocumentOutputConfig()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, model_); } if (glossaryConfig_ != null) { @@ -798,13 +798,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetLanguageCode_); } if (documentInputConfig_ != null) { @@ -814,7 +814,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentOutputConfig()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, model_); } if (glossaryConfig_ != null) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentResponse.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentResponse.java index dee70b06..c9884661 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentResponse.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentResponse.java @@ -399,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (glossaryDocumentTranslation_ != null) { output.writeMessage(2, getGlossaryDocumentTranslation()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); } if (glossaryConfig_ != null) { @@ -422,7 +422,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, getGlossaryDocumentTranslation()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); } if (glossaryConfig_ != null) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextGlossaryConfig.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextGlossaryConfig.java index aeee3232..4076cead 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextGlossaryConfig.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextGlossaryConfig.java @@ -205,7 +205,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getGlossaryBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(glossary_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, glossary_); } if (ignoreCase_ != false) { @@ -220,7 +220,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getGlossaryBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(glossary_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, glossary_); } if (ignoreCase_ != false) { diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextRequest.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextRequest.java index 926bcc23..587cdbf5 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextRequest.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateTextRequest.java @@ -769,22 +769,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contents_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contents_.getRaw(i)); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, model_); } if (glossaryConfig_ != null) { output.writeMessage(7, getGlossaryConfig()); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, parent_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -806,22 +806,22 @@ public int getSerializedSize() { size += dataSize; size += 1 * getContentsList().size(); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, model_); } if (glossaryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGlossaryConfig()); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, parent_); } for (java.util.Map.Entry entry : diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Translation.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Translation.java index ac1df570..1f11ed9c 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Translation.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/Translation.java @@ -376,16 +376,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTranslatedTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(translatedText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, translatedText_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } if (glossaryConfig_ != null) { output.writeMessage(3, getGlossaryConfig()); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, detectedLanguageCode_); } unknownFields.writeTo(output); @@ -397,16 +397,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTranslatedTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(translatedText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, translatedText_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } if (glossaryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGlossaryConfig()); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, detectedLanguageCode_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslationServiceProto.java b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslationServiceProto.java index a910f6fb..d0d9cc1a 100644 --- a/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslationServiceProto.java +++ b/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslationServiceProto.java @@ -445,7 +445,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\0132\032.google.protobuf.Timestamp\"e\n\005State\022\025" + "\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSU" + "CCEEDED\020\002\022\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020\004\022\r\n" - + "\tCANCELLED\020\0052\326\023\n\022TranslationService\022\324\002\n\r" + + "\tCANCELLED\020\0052\246\024\n\022TranslationService\022\324\002\n\r" + "TranslateText\0221.google.cloud.translation" + ".v3.TranslateTextRequest\0322.google.cloud." + "translation.v3.TranslateTextResponse\"\333\001\202" @@ -478,12 +478,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "uest\032\035.google.longrunning.Operation\"t\202\323\344" + "\223\002;\"6/v3/{parent=projects/*/locations/*}" + ":batchTranslateText:\001*\312A0\n\026BatchTranslat" - + "eResponse\022\026BatchTranslateMetadata\022\376\001\n\026Ba" + + "eResponse\022\026BatchTranslateMetadata\022\316\002\n\026Ba" + "tchTranslateDocument\022:.google.cloud.tran" + "slation.v3.BatchTranslateDocumentRequest" - + "\032\035.google.longrunning.Operation\"\210\001\202\323\344\223\002?" + + "\032\035.google.longrunning.Operation\"\330\001\202\323\344\223\002?" + "\":/v3/{parent=projects/*/locations/*}:ba" - + "tchTranslateDocument:\001*\312A@\n\036BatchTransla" + + "tchTranslateDocument:\001*\332AMparent,source_" + + "language_code,target_language_codes,inpu" + + "t_configs,output_config\312A@\n\036BatchTransla" + "teDocumentResponse\022\036BatchTranslateDocume" + "ntMetadata\022\334\001\n\016CreateGlossary\0222.google.c" + "loud.translation.v3.CreateGlossaryReques" diff --git a/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto b/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto index 070786ce..9f770248 100644 --- a/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto +++ b/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto @@ -123,6 +123,8 @@ service TranslationService { post: "/v3/{parent=projects/*/locations/*}:batchTranslateDocument" body: "*" }; + option (google.api.method_signature) = + "parent,source_language_code,target_language_codes,input_configs,output_config"; option (google.longrunning.operation_info) = { response_type: "BatchTranslateDocumentResponse" metadata_type: "BatchTranslateDocumentMetadata" diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java index 6b7c7e0a..df03662e 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/GetLocationRequest.java @@ -174,7 +174,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -186,7 +186,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java index e1b3af7f..7fcb20d6 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsRequest.java @@ -311,16 +311,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); } if (pageSize_ != 0) { output.writeInt32(3, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } unknownFields.writeTo(output); @@ -332,16 +332,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java index 8e7553c0..77ad1993 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/ListLocationsResponse.java @@ -262,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < locations_.size(); i++) { output.writeMessage(1, locations_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -277,7 +277,7 @@ public int getSerializedSize() { for (int i = 0; i < locations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, locations_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/Location.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/Location.java index 7b7bfc86..0288131d 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/Location.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/location/Location.java @@ -482,7 +482,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -490,10 +490,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (metadata_ != null) { output.writeMessage(3, getMetadata()); } - if (!getLocationIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } unknownFields.writeTo(output); @@ -505,7 +505,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry entry : @@ -521,10 +521,10 @@ public int getSerializedSize() { if (metadata_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMetadata()); } - if (!getLocationIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentRequest.java index eeada506..48ec3aab 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentRequest.java @@ -985,10 +985,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } for (int i = 0; i < targetLanguageCodes_.size(); i++) { @@ -1018,10 +1018,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java index 99b6cacd..be7fcabd 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequest.java @@ -951,10 +951,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } for (int i = 0; i < targetLanguageCodes_.size(); i++) { @@ -981,10 +981,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java index a5419c1c..02ed7579 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryMetadata.java @@ -510,7 +510,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (state_ @@ -530,7 +530,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (state_ diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java index a3cb92dc..7c6c8b02 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/CreateGlossaryRequest.java @@ -248,7 +248,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (glossary_ != null) { @@ -263,7 +263,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (glossary_ != null) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java index 5a535324..e48a1939 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryMetadata.java @@ -510,7 +510,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (state_ @@ -530,7 +530,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (state_ diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java index 3c796061..94fb44b0 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java index 09f53096..adbb9d98 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponse.java @@ -304,7 +304,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (submitTime_ != null) { @@ -322,7 +322,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (submitTime_ != null) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java index 584da741..18936582 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectLanguageRequest.java @@ -585,13 +585,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -608,13 +608,13 @@ public int getSerializedSize() { if (sourceCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); } for (java.util.Map.Entry entry : diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java index 4b213fd2..019bb373 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DetectedLanguage.java @@ -199,7 +199,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } if (confidence_ != 0F) { @@ -214,7 +214,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } if (confidence_ != 0F) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentInputConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentInputConfig.java index 17e1f527..2c277ae7 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentInputConfig.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentInputConfig.java @@ -354,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 2) { output.writeMessage(2, (com.google.cloud.translate.v3beta1.GcsSource) source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_); } unknownFields.writeTo(output); @@ -376,7 +376,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.translate.v3beta1.GcsSource) source_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentOutputConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentOutputConfig.java index 2be0d86c..48e9e506 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentOutputConfig.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentOutputConfig.java @@ -412,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { output.writeMessage(1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } unknownFields.writeTo(output); @@ -429,7 +429,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentTranslation.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentTranslation.java index e39d786c..6f918ca0 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentTranslation.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentTranslation.java @@ -309,10 +309,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < byteStreamOutputs_.size(); i++) { output.writeBytes(1, byteStreamOutputs_.get(i)); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detectedLanguageCode_); } unknownFields.writeTo(output); @@ -333,10 +333,10 @@ public int getSerializedSize() { size += dataSize; size += 1 * getByteStreamOutputsList().size(); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, detectedLanguageCode_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java index fa7028d9..3f77be41 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsDestination.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getOutputUriPrefixBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUriPrefix_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getOutputUriPrefixBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputUriPrefix_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java index 3b3c3c7b..96b5a7ad 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GcsSource.java @@ -174,7 +174,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getInputUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); } unknownFields.writeTo(output); @@ -186,7 +186,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getInputUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java index 83cba720..7f2c7bbb 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetGlossaryRequest.java @@ -178,7 +178,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -190,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java index b71f8872..e89f22d4 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequest.java @@ -326,13 +326,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDisplayLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parent_); } unknownFields.writeTo(output); @@ -344,13 +344,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDisplayLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parent_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java index d7868796..266e4101 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Glossary.java @@ -481,10 +481,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetLanguageCode_); } unknownFields.writeTo(output); @@ -496,10 +496,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetLanguageCode_); } size += unknownFields.getSerializedSize(); @@ -2292,7 +2292,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (languagesCase_ == 3) { @@ -2324,7 +2324,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (languagesCase_ == 3) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java index f12f5f1e..670be9bc 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/InputConfig.java @@ -336,7 +336,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); } if (sourceCase_ == 2) { @@ -351,7 +351,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); } if (sourceCase_ == 2) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java index 1ea16f21..3df50ab0 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequest.java @@ -352,16 +352,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } unknownFields.writeTo(output); @@ -373,16 +373,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - if (!getFilterBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java index b9ccc8b3..538721e8 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesResponse.java @@ -267,7 +267,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < glossaries_.size(); i++) { output.writeMessage(1, glossaries_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -282,7 +282,7 @@ public int getSerializedSize() { for (int i = 0; i < glossaries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, glossaries_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java index 5870a524..c5d5cbcc 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/SupportedLanguage.java @@ -286,10 +286,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (supportSource_ != false) { @@ -307,10 +307,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } - if (!getDisplayNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (supportSource_ != false) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentRequest.java index 97c24659..ff8b3240 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentRequest.java @@ -765,13 +765,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetLanguageCode_); } if (documentInputConfig_ != null) { @@ -780,7 +780,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (documentOutputConfig_ != null) { output.writeMessage(5, getDocumentOutputConfig()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, model_); } if (glossaryConfig_ != null) { @@ -797,13 +797,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetLanguageCode_); } if (documentInputConfig_ != null) { @@ -813,7 +813,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentOutputConfig()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, model_); } if (glossaryConfig_ != null) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentResponse.java index 135971d6..c4888668 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentResponse.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentResponse.java @@ -400,7 +400,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (glossaryDocumentTranslation_ != null) { output.writeMessage(2, getGlossaryDocumentTranslation()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_); } if (glossaryConfig_ != null) { @@ -423,7 +423,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, getGlossaryDocumentTranslation()); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_); } if (glossaryConfig_ != null) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java index 5c1e954f..4963e27b 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java @@ -201,7 +201,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getGlossaryBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(glossary_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, glossary_); } if (ignoreCase_ != false) { @@ -216,7 +216,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getGlossaryBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(glossary_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, glossary_); } if (ignoreCase_ != false) { diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequest.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequest.java index c4422246..a1213801 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequest.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequest.java @@ -766,22 +766,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contents_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, contents_.getRaw(i)); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, model_); } if (glossaryConfig_ != null) { output.writeMessage(7, getGlossaryConfig()); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, parent_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -803,22 +803,22 @@ public int getSerializedSize() { size += dataSize; size += 1 * getContentsList().size(); } - if (!getMimeTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_); } - if (!getSourceLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceLanguageCode_); } - if (!getTargetLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetLanguageCode_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, model_); } if (glossaryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGlossaryConfig()); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, parent_); } for (java.util.Map.Entry entry : diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Translation.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Translation.java index b85cf13f..599ba4ce 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Translation.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/Translation.java @@ -377,16 +377,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTranslatedTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(translatedText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, translatedText_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, model_); } if (glossaryConfig_ != null) { output.writeMessage(3, getGlossaryConfig()); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, detectedLanguageCode_); } unknownFields.writeTo(output); @@ -398,16 +398,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTranslatedTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(translatedText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, translatedText_); } - if (!getModelBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, model_); } if (glossaryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGlossaryConfig()); } - if (!getDetectedLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detectedLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, detectedLanguageCode_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceProto.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceProto.java index d20e7a8d..c5d28b95 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceProto.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceProto.java @@ -450,7 +450,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "google.protobuf.Timestamp\"e\n\005State\022\025\n\021ST" + "ATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEE" + "DED\020\002\022\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCAN" - + "CELLED\020\0052\362\023\n\022TranslationService\022\364\001\n\rTran" + + "CELLED\020\0052\302\024\n\022TranslationService\022\364\001\n\rTran" + "slateText\0226.google.cloud.translation.v3b" + "eta1.TranslateTextRequest\0327.google.cloud" + ".translation.v3beta1.TranslateTextRespon" @@ -482,12 +482,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle.longrunning.Operation\"y\202\323\344\223\002@\";/v3" + "beta1/{parent=projects/*/locations/*}:ba" + "tchTranslateText:\001*\312A0\n\026BatchTranslateRe" - + "sponse\022\026BatchTranslateMetadata\022\210\002\n\026Batch" + + "sponse\022\026BatchTranslateMetadata\022\330\002\n\026Batch" + "TranslateDocument\022?.google.cloud.transla" + "tion.v3beta1.BatchTranslateDocumentReque" - + "st\032\035.google.longrunning.Operation\"\215\001\202\323\344\223" + + "st\032\035.google.longrunning.Operation\"\335\001\202\323\344\223" + "\002D\"?/v3beta1/{parent=projects/*/location" - + "s/*}:batchTranslateDocument:\001*\312A@\n\036Batch" + + "s/*}:batchTranslateDocument:\001*\332AMparent," + + "source_language_code,target_language_cod" + + "es,input_configs,output_config\312A@\n\036Batch" + "TranslateDocumentResponse\022\036BatchTranslat" + "eDocumentMetadata\022\346\001\n\016CreateGlossary\0227.g" + "oogle.cloud.translation.v3beta1.CreateGl" diff --git a/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto b/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto index 03386518..362d3ef3 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto +++ b/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto @@ -120,6 +120,8 @@ service TranslationService { post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateDocument" body: "*" }; + option (google.api.method_signature) = + "parent,source_language_code,target_language_codes,input_configs,output_config"; option (google.longrunning.operation_info) = { response_type: "BatchTranslateDocumentResponse" metadata_type: "BatchTranslateDocumentMetadata"