Format: `projects/{project-id}/locations/{location-id}` or `projects/{project-id}`. - *
For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - *
Only models within the same region (has same location-id) can be used. Otherwise an - * INVALID_ARGUMENT (400) error is returned. + *
Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + *
For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + *
Only models within the same region, which have the same location-id, can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. * @param model Optional. The language detection model to be used. *
Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` *
Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. *
If not specified, the default model is used. * @param mimeType Optional. The format of the source text, for example, "text/html", * "text/plain". If left blank, the MIME type defaults to "text/html". @@ -296,16 +297,17 @@ public final DetectLanguageResponse detectLanguage( * } * * @param parent Required. Project or location to make a call. Must refer to a caller's project. - *
Format: `projects/{project-id}/locations/{location-id}` or `projects/{project-id}`. - *
For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - *
Only models within the same region (has same location-id) can be used. Otherwise an - * INVALID_ARGUMENT (400) error is returned. + *
Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + *
For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + *
Only models within the same region, which have the same location-id, can be used. + * Otherwise an INVALID_ARGUMENT (400) error is returned. * @param model Optional. The language detection model to be used. *
Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` *
Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. *
If not specified, the default model is used. * @param mimeType Optional. The format of the source text, for example, "text/html", * "text/plain". If left blank, the MIME type defaults to "text/html". @@ -391,9 +393,10 @@ public final DetectLanguageResponse detectLanguage(DetectLanguageRequest request * } * * @param parent Required. Project or location to make a call. Must refer to a caller's project. - *
Format: `projects/{project-id}` or `projects/{project-id}/locations/{location-id}`. - *
For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + *
Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + *
For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. *
Non-global location is required for AutoML models. *
Only models within the same region (have same location-id) can be used, otherwise an * INVALID_ARGUMENT (400) error is returned. @@ -403,10 +406,10 @@ public final DetectLanguageResponse detectLanguage(DetectLanguageRequest request * @param model Optional. Get supported languages of this model. *
The format depends on model type: *
- AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
Returns languages supported by the specified model. If missing, we get supported * languages of Google general base (PBMT) model. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -439,9 +442,10 @@ public final SupportedLanguages getSupportedLanguages( * } * * @param parent Required. Project or location to make a call. Must refer to a caller's project. - *
Format: `projects/{project-id}` or `projects/{project-id}/locations/{location-id}`. - *
For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + *
Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + *
For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. *
Non-global location is required for AutoML models. *
Only models within the same region (have same location-id) can be used, otherwise an * INVALID_ARGUMENT (400) error is returned. @@ -451,10 +455,10 @@ public final SupportedLanguages getSupportedLanguages( * @param model Optional. Get supported languages of this model. *
The format depends on model type: *
- AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` *
- General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` *
Returns languages supported by the specified model. If missing, we get supported * languages of Google general base (PBMT) model. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -521,6 +525,67 @@ public final SupportedLanguages getSupportedLanguages(GetSupportedLanguagesReque return stub.getSupportedLanguagesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates documents in synchronous mode. + * + *
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * TranslateDocumentRequest request = + * TranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .setTargetLanguageCode("targetLanguageCode-106414698") + * .setDocumentInputConfig(DocumentInputConfig.newBuilder().build()) + * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) + * .setModel("model104069929") + * .setGlossaryConfig(TranslateTextGlossaryConfig.newBuilder().build()) + * .putAllLabels(new HashMap+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TranslateDocumentResponse translateDocument(TranslateDocumentRequest request) { + return translateDocumentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Translates documents in synchronous mode. + * + *()) + * .build(); + * TranslateDocumentResponse response = translationServiceClient.translateDocument(request); + * } + * }
Sample code: + * + *
{@code + * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { + * TranslateDocumentRequest request = + * TranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .setTargetLanguageCode("targetLanguageCode-106414698") + * .setDocumentInputConfig(DocumentInputConfig.newBuilder().build()) + * .setDocumentOutputConfig(DocumentOutputConfig.newBuilder().build()) + * .setModel("model104069929") + * .setGlossaryConfig(TranslateTextGlossaryConfig.newBuilder().build()) + * .putAllLabels(new HashMap+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * translationServiceClient.translateDocumentCallable().futureCall(request); + * // Do something. + * TranslateDocumentResponse response = future.get(); + * } + * }
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()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .build(); + * BatchTranslateDocumentResponse response = + * translationServiceClient.batchTranslateDocumentAsync(request).get(); + * } + * }
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()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ */ + public final OperationCallable< + BatchTranslateDocumentRequest, + BatchTranslateDocumentResponse, + BatchTranslateDocumentMetadata> + batchTranslateDocumentOperationCallable() { + return stub.batchTranslateDocumentOperationCallable(); + } + + // 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. + * + *()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .build(); + * OperationFuture future = + * translationServiceClient.batchTranslateDocumentOperationCallable().futureCall(request); + * // Do something. + * BatchTranslateDocumentResponse response = future.get(); + * } + * }
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()) { + * BatchTranslateDocumentRequest request = + * BatchTranslateDocumentRequest.newBuilder() + * .setParent("parent-995424086") + * .setSourceLanguageCode("sourceLanguageCode1645917472") + * .addAllTargetLanguageCodes(new ArrayList+ */ + public final UnaryCallable()) + * .addAllInputConfigs(new ArrayList ()) + * .setOutputConfig(BatchDocumentOutputConfig.newBuilder().build()) + * .putAllModels(new HashMap ()) + * .putAllGlossaries(new HashMap ()) + * .build(); + * ApiFuture future = + * translationServiceClient.batchTranslateDocumentCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: - * - *
{@code - * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * for (Glossary element : translationServiceClient.listGlossaries(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The name of the project from which to list all of the glossaries. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListGlossariesPagedResponse listGlossaries(LocationName parent) { - ListGlossariesRequest request = - ListGlossariesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listGlossaries(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. - * - *
Sample code: - * - *
{@code - * try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) { - * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - * for (Glossary element : translationServiceClient.listGlossaries(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The name of the project from which to list all of the glossaries. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListGlossariesPagedResponse listGlossaries(String parent) { - ListGlossariesRequest request = ListGlossariesRequest.newBuilder().setParent(parent).build(); - return listGlossaries(request); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. @@ -829,9 +957,18 @@ public final ListGlossariesPagedResponse listGlossaries(String parent) { * } * * @param parent Required. The name of the project from which to list all of the glossaries. - * @param filter Optional. Filter specifying constraints of a list operation. Filtering is not - * supported yet, and the parameter currently has no effect. If missing, no filtering is - * performed. + * @param filter Optional. Filter specifying constraints of a list operation. Specify the + * constraint by the format of "key=value", where key must be "src" or "tgt", and the value + * must be a valid language code. For multiple restrictions, concatenate them by "AND" + * (uppercase only), such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, which depends on + * the language code you used when you create the glossary. For the unidirectional glossaries, + * the "src" and "tgt" add restrictions on the source and target language code separately. For + * the equivalent term set glossaries, the "src" and/or "tgt" add restrictions on the term + * set. For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional glossaries + * which exactly match the source language code as "en-US" and the target language code + * "zh-CN", but all equivalent term set glossaries which contain "en-US" and "zh-CN" in their + * language set will be picked. If missing, no filtering is performed. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGlossariesPagedResponse listGlossaries(LocationName parent, String filter) { @@ -861,9 +998,18 @@ public final ListGlossariesPagedResponse listGlossaries(LocationName parent, Str * } * * @param parent Required. The name of the project from which to list all of the glossaries. - * @param filter Optional. Filter specifying constraints of a list operation. Filtering is not - * supported yet, and the parameter currently has no effect. If missing, no filtering is - * performed. + * @param filter Optional. Filter specifying constraints of a list operation. Specify the + * constraint by the format of "key=value", where key must be "src" or "tgt", and the value + * must be a valid language code. For multiple restrictions, concatenate them by "AND" + * (uppercase only), such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, which depends on + * the language code you used when you create the glossary. For the unidirectional glossaries, + * the "src" and "tgt" add restrictions on the source and target language code separately. For + * the equivalent term set glossaries, the "src" and/or "tgt" add restrictions on the term + * set. For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional glossaries + * which exactly match the source language code as "en-US" and the target language code + * "zh-CN", but all equivalent term set glossaries which contain "en-US" and "zh-CN" in their + * language set will be picked. If missing, no filtering is performed. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGlossariesPagedResponse listGlossaries(String parent, String filter) { diff --git a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceSettings.java b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceSettings.java index 36012127..a4f77f3a 100644 --- a/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceSettings.java +++ b/google-cloud-translate/src/main/java/com/google/cloud/translate/v3beta1/TranslationServiceSettings.java @@ -89,6 +89,12 @@ public UnaryCallSettings
+ * Translates documents in synchronous mode. + *+ */ + public void translateDocument( + com.google.cloud.translate.v3beta1.TranslateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * 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. + *+ */ + public void batchTranslateDocument( + com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Translates documents in synchronous mode. + *+ */ + public void translateDocument( + com.google.cloud.translate.v3beta1.TranslateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * 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. + *+ */ + public void batchTranslateDocument( + com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest request, + io.grpc.stub.StreamObserver
+ * Translates documents in synchronous mode. + *+ */ + public com.google.cloud.translate.v3beta1.TranslateDocumentResponse translateDocument( + com.google.cloud.translate.v3beta1.TranslateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTranslateDocumentMethod(), getCallOptions(), request); + } + /** * * @@ -885,6 +1081,24 @@ public com.google.longrunning.Operation batchTranslateText( getChannel(), getBatchTranslateTextMethod(), getCallOptions(), request); } + /** + * + * + *
+ * 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. + *+ */ + public com.google.longrunning.Operation batchTranslateDocument( + com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchTranslateDocumentMethod(), getCallOptions(), request); + } + /** * * @@ -1005,6 +1219,20 @@ protected TranslationServiceFutureStub build( getChannel().newCall(getGetSupportedLanguagesMethod(), getCallOptions()), request); } + /** + * + * + *
+ * Translates documents in synchronous mode. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.translate.v3beta1.TranslateDocumentResponse> + translateDocument(com.google.cloud.translate.v3beta1.TranslateDocumentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTranslateDocumentMethod(), getCallOptions()), request); + } + /** * * @@ -1023,6 +1251,25 @@ protected TranslationServiceFutureStub build( getChannel().newCall(getBatchTranslateTextMethod(), getCallOptions()), request); } + /** + * + * + *
+ * 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. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Input configuration for BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchDocumentInputConfig} + */ +public final class BatchDocumentInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchDocumentInputConfig) + BatchDocumentInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDocumentInputConfig.newBuilder() to construct. + private BatchDocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchDocumentInputConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDocumentInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDocumentInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 1) { + subBuilder = ((com.google.cloud.translate.v3beta1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.translate.v3beta1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 1; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.class, + com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_SOURCE(1), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return GCS_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+ * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (sourceCase_ == 1) {
+ output.writeMessage(1, (com.google.cloud.translate.v3beta1.GcsSource) source_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (sourceCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.cloud.translate.v3beta1.GcsSource) source_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.BatchDocumentInputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig other =
+ (com.google.cloud.translate.v3beta1.BatchDocumentInputConfig) obj;
+
+ if (!getSourceCase().equals(other.getSourceCase())) return false;
+ switch (sourceCase_) {
+ case 1:
+ if (!getGcsSource().equals(other.getGcsSource())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (sourceCase_) {
+ case 1:
+ hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsSource().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Input configuration for BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchDocumentInputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ } else {
+ if (sourceCase_ == 1) {
+ return gcsSourceBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder setGcsSource(
+ com.google.cloud.translate.v3beta1.GcsSource.Builder builderForValue) {
+ if (gcsSourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(builderForValue.build());
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder mergeGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1
+ && source_ != com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance()) {
+ source_ =
+ com.google.cloud.translate.v3beta1.GcsSource.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ if (sourceCase_ == 1) {
+ gcsSourceBuilder_.mergeFrom(value);
+ }
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public Builder clearGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ } else {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ }
+ gcsSourceBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource.Builder getGcsSourceBuilder() {
+ return getGcsSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) {
+ return gcsSourceBuilder_.getMessageOrBuilder();
+ } else {
+ if (sourceCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ getGcsSourceFieldBuilder() {
+ if (gcsSourceBuilder_ == null) {
+ if (!(sourceCase_ == 1)) {
+ source_ = com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ gcsSourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_,
+ getParentForChildren(),
+ isClean());
+ source_ = null;
+ }
+ sourceCase_ = 1;
+ onChanged();
+ ;
+ return gcsSourceBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchDocumentInputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchDocumentInputConfig)
+ private static final com.google.cloud.translate.v3beta1.BatchDocumentInputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchDocumentInputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentInputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ boolean hasGcsSource();
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ *
+ * @return The gcsSource.
+ */
+ com.google.cloud.translate.v3beta1.GcsSource getGcsSource();
+ /**
+ *
+ *
+ * + * Google Cloud Storage location for the source input. + * This can be a single file (for example, + * `gs://translation-test/input.docx`) or a wildcard (for example, + * `gs://translation-test/*`). + * File mime type is determined based on extension. Supported mime type + * includes: + * - `pdf`, application/pdf + * - `docx`, + * application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - `pptx`, + * application/vnd.openxmlformats-officedocument.presentationml.presentation + * - `xlsx`, + * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + * The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. + * The max file size supported for `.pdf` is 1GB and the max page limit is + * 1000 pages. + * The max file size supported for all input documents is 1GB. + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.SourceCase getSourceCase();
+}
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchDocumentOutputConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchDocumentOutputConfig.java
new file mode 100644
index 00000000..207fc95e
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchDocumentOutputConfig.java
@@ -0,0 +1,1287 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Output configuration for BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchDocumentOutputConfig} + */ +public final class BatchDocumentOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchDocumentOutputConfig) + BatchDocumentOutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDocumentOutputConfig.newBuilder() to construct. + private BatchDocumentOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchDocumentOutputConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDocumentOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchDocumentOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.translate.v3beta1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.translate.v3beta1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.class, + com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+ * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (destinationCase_ == 1) {
+ output.writeMessage(1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (destinationCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig other =
+ (com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig) obj;
+
+ if (!getDestinationCase().equals(other.getDestinationCase())) return false;
+ switch (destinationCase_) {
+ case 1:
+ if (!getGcsDestination().equals(other.getGcsDestination())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (destinationCase_) {
+ case 1:
+ hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsDestination().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Output configuration for BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchDocumentOutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ } else {
+ if (destinationCase_ == 1) {
+ return gcsDestinationBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ destination_ = value;
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder setGcsDestination(
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder builderForValue) {
+ if (gcsDestinationBuilder_ == null) {
+ destination_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(builderForValue.build());
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1
+ && destination_
+ != com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance()) {
+ destination_ =
+ com.google.cloud.translate.v3beta1.GcsDestination.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsDestination) destination_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ destination_ = value;
+ }
+ onChanged();
+ } else {
+ if (destinationCase_ == 1) {
+ gcsDestinationBuilder_.mergeFrom(value);
+ }
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public Builder clearGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ onChanged();
+ }
+ } else {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ }
+ gcsDestinationBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinationBuilder() {
+ return getGcsDestinationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) {
+ return gcsDestinationBuilder_.getMessageOrBuilder();
+ } else {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>
+ getGcsDestinationFieldBuilder() {
+ if (gcsDestinationBuilder_ == null) {
+ if (!(destinationCase_ == 1)) {
+ destination_ = com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ gcsDestinationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>(
+ (com.google.cloud.translate.v3beta1.GcsDestination) destination_,
+ getParentForChildren(),
+ isClean());
+ destination_ = null;
+ }
+ destinationCase_ = 1;
+ onChanged();
+ ;
+ return gcsDestinationBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchDocumentOutputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchDocumentOutputConfig)
+ private static final com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ boolean hasGcsDestination();
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ *
+ * @return The gcsDestination.
+ */
+ com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination();
+ /**
+ *
+ *
+ * + * Google Cloud Storage destination for output content. + * For every single input document (for example, gs://a/b/c.[extension]), we + * generate at most 2 * n output files. (n is the # of target_language_codes + * in the BatchTranslateDocumentRequest). + * While the input documents are being processed, we write/update an index + * file `index.csv` under `gcs_destination.output_uri_prefix` (for example, + * gs://translation_output/index.csv) The index file is generated/updated as + * new files are being translated. The format is: + * input_document,target_language_code,translation_output,error_output, + * glossary_translation_output,glossary_error_output + * `input_document` is one file we matched using gcs_source.input_uri. + * `target_language_code` is provided in the request. + * `translation_output` contains the translations. (details provided below) + * `error_output` contains the error message during processing of the file. + * Both translations_file and errors_file could be empty strings if we have + * no content to output. + * `glossary_translation_output` and `glossary_error_output` are the + * translated output/error when we apply glossaries. They could also be + * empty if we have no content to output. + * Once a row is present in index.csv, the input/output matching never + * changes. Callers should also expect all the content in input_file are + * processed and ready to be consumed (that is, no partial output file is + * written). + * Since index.csv will be keeping updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may avoid file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) + * The naming format of translation output files follows (for target + * language code [trg]): `translation_output`: + * gs://translation_output/a_b_c_[trg]_translation.[extension] + * `glossary_translation_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.[extension] The + * output document will maintain the same file format as the input document. + * The naming format of error output files follows (for target language code + * [trg]): `error_output`: gs://translation_test/a_b_c_[trg]_errors.txt + * `glossary_error_output`: + * gs://translation_test/a_b_c_[trg]_glossary_translation.txt The error + * output is a txt file containing error details. + *+ * + *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
+ */
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder();
+
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.DestinationCase
+ getDestinationCase();
+}
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentMetadata.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentMetadata.java
new file mode 100644
index 00000000..b44aa671
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentMetadata.java
@@ -0,0 +1,1883 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * State metadata for the batch translation operation. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata} + */ +public final class BatchTranslateDocumentMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata) + BatchTranslateDocumentMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateDocumentMetadata.newBuilder() to construct. + private BatchTranslateDocumentMetadata( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateDocumentMetadata() { + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchTranslateDocumentMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateDocumentMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 16: + { + totalPages_ = input.readInt64(); + break; + } + case 24: + { + translatedPages_ = input.readInt64(); + break; + } + case 32: + { + failedPages_ = input.readInt64(); + break; + } + case 40: + { + totalBillablePages_ = input.readInt64(); + break; + } + case 48: + { + totalCharacters_ = input.readInt64(); + break; + } + case 56: + { + translatedCharacters_ = input.readInt64(); + break; + } + case 64: + { + failedCharacters_ = input.readInt64(); + break; + } + case 72: + { + totalBillableCharacters_ = input.readInt64(); + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.class, + com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.Builder.class); + } + + /** + * + * + *
+ * State of the job. + *+ * + * Protobuf enum {@code google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Invalid. + *+ * + *
STATE_UNSPECIFIED = 0;
+ */
+ STATE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Request is being processed. + *+ * + *
RUNNING = 1;
+ */
+ RUNNING(1),
+ /**
+ *
+ *
+ * + * The batch is processed, and at least one item was successfully processed. + *+ * + *
SUCCEEDED = 2;
+ */
+ SUCCEEDED(2),
+ /**
+ *
+ *
+ * + * The batch is done and no item was successfully processed. + *+ * + *
FAILED = 3;
+ */
+ FAILED(3),
+ /**
+ *
+ *
+ * + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + *+ * + *
CANCELLING = 4;
+ */
+ CANCELLING(4),
+ /**
+ *
+ *
+ * + * The batch is done after the user has called the + * longrunning.Operations.CancelOperation. Any records processed before the + * cancel command are output as specified in the request. + *+ * + *
CANCELLED = 5;
+ */
+ CANCELLED(5),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Invalid. + *+ * + *
STATE_UNSPECIFIED = 0;
+ */
+ public static final int STATE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Request is being processed. + *+ * + *
RUNNING = 1;
+ */
+ public static final int RUNNING_VALUE = 1;
+ /**
+ *
+ *
+ * + * The batch is processed, and at least one item was successfully processed. + *+ * + *
SUCCEEDED = 2;
+ */
+ public static final int SUCCEEDED_VALUE = 2;
+ /**
+ *
+ *
+ * + * The batch is done and no item was successfully processed. + *+ * + *
FAILED = 3;
+ */
+ public static final int FAILED_VALUE = 3;
+ /**
+ *
+ *
+ * + * Request is in the process of being canceled after caller invoked + * longrunning.Operations.CancelOperation on the request id. + *+ * + *
CANCELLING = 4;
+ */
+ public static final int CANCELLING_VALUE = 4;
+ /**
+ *
+ *
+ * + * The batch is done after the user has called the + * longrunning.Operations.CancelOperation. Any records processed before the + * cancel command are output as specified in the request. + *+ * + *
CANCELLED = 5;
+ */
+ public static final int CANCELLED_VALUE = 5;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static State valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static State forNumber(int value) {
+ switch (value) {
+ case 0:
+ return STATE_UNSPECIFIED;
+ case 1:
+ return RUNNING;
+ case 2:
+ return SUCCEEDED;
+ case 3:
+ return FAILED;
+ case 4:
+ return CANCELLING;
+ case 5:
+ return CANCELLED;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State result =
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int TOTAL_PAGES_FIELD_NUMBER = 2;
+ private long totalPages_;
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+
+ public static final int TRANSLATED_PAGES_FIELD_NUMBER = 3;
+ private long translatedPages_;
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+
+ public static final int FAILED_PAGES_FIELD_NUMBER = 4;
+ private long failedPages_;
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+
+ public static final int TOTAL_BILLABLE_PAGES_FIELD_NUMBER = 5;
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + *+ * + *
int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+
+ public static final int TOTAL_CHARACTERS_FIELD_NUMBER = 6;
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents so far. + *+ * + *
int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+
+ public static final int TRANSLATED_CHARACTERS_FIELD_NUMBER = 7;
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + *+ * + *
int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+
+ public static final int FAILED_CHARACTERS_FIELD_NUMBER = 8;
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + *+ * + *
int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+
+ public static final int TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER = 9;
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + *+ * + *
int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 10;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (state_
+ != com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, state_);
+ }
+ if (totalPages_ != 0L) {
+ output.writeInt64(2, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ output.writeInt64(3, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ output.writeInt64(4, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ output.writeInt64(5, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ output.writeInt64(6, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ output.writeInt64(7, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ output.writeInt64(8, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ output.writeInt64(9, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(10, getSubmitTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (state_
+ != com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.STATE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_);
+ }
+ if (totalPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getSubmitTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata other =
+ (com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata) obj;
+
+ if (state_ != other.state_) return false;
+ if (getTotalPages() != other.getTotalPages()) return false;
+ if (getTranslatedPages() != other.getTranslatedPages()) return false;
+ if (getFailedPages() != other.getFailedPages()) return false;
+ if (getTotalBillablePages() != other.getTotalBillablePages()) return false;
+ if (getTotalCharacters() != other.getTotalCharacters()) return false;
+ if (getTranslatedCharacters() != other.getTranslatedCharacters()) return false;
+ if (getFailedCharacters() != other.getFailedCharacters()) return false;
+ if (getTotalBillableCharacters() != other.getTotalBillableCharacters()) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + STATE_FIELD_NUMBER;
+ hash = (53 * hash) + state_;
+ hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalPages());
+ hash = (37 * hash) + TRANSLATED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedPages());
+ hash = (37 * hash) + FAILED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedPages());
+ hash = (37 * hash) + TOTAL_BILLABLE_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillablePages());
+ hash = (37 * hash) + TOTAL_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCharacters());
+ hash = (37 * hash) + TRANSLATED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedCharacters());
+ hash = (37 * hash) + FAILED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedCharacters());
+ hash = (37 * hash) + TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillableCharacters());
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * State metadata for the batch translation operation. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ @java.lang.Override
+ public int getStateValue() {
+ return state_;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStateValue(int value) {
+
+ state_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ *
+ * @return The state.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State getState() {
+ @SuppressWarnings("deprecation")
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State result =
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.valueOf(state_);
+ return result == null
+ ? com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ *
+ * @param value The state to set.
+ * @return This builder for chaining.
+ */
+ public Builder setState(
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ state_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearState() {
+
+ state_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long totalPages_;
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 2;
+ *
+ * @param value The totalPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalPages(long value) {
+
+ totalPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalPages() {
+
+ totalPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedPages_;
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 3;
+ *
+ * @param value The translatedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedPages(long value) {
+
+ translatedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedPages() {
+
+ translatedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedPages_;
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 4;
+ *
+ * @param value The failedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedPages(long value) {
+
+ failedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedPages() {
+
+ failedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + *+ * + *
int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + *+ * + *
int64 total_billable_pages = 5;
+ *
+ * @param value The totalBillablePages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillablePages(long value) {
+
+ totalBillablePages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + *+ * + *
int64 total_billable_pages = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillablePages() {
+
+ totalBillablePages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents so far. + *+ * + *
int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents so far. + *+ * + *
int64 total_characters = 6;
+ *
+ * @param value The totalCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalCharacters(long value) {
+
+ totalCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents so far. + *+ * + *
int64 total_characters = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalCharacters() {
+
+ totalCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + *+ * + *
int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + *+ * + *
int64 translated_characters = 7;
+ *
+ * @param value The translatedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedCharacters(long value) {
+
+ translatedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + *+ * + *
int64 translated_characters = 7;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedCharacters() {
+
+ translatedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + *+ * + *
int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + *+ * + *
int64 failed_characters = 8;
+ *
+ * @param value The failedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedCharacters(long value) {
+
+ failedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + *+ * + *
int64 failed_characters = 8;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedCharacters() {
+
+ failedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + *+ * + *
int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + *+ * + *
int64 total_billable_characters = 9;
+ *
+ * @param value The totalBillableCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillableCharacters(long value) {
+
+ totalBillableCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + *+ * + *
int64 total_billable_characters = 9;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillableCharacters() {
+
+ totalBillableCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp submitTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ submitTimeBuilder_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ submitTime_ = value;
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (submitTime_ != null) {
+ submitTime_ =
+ com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial();
+ } else {
+ submitTime_ = value;
+ }
+ onChanged();
+ } else {
+ submitTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getSubmitTimeFieldBuilder() {
+ if (submitTimeBuilder_ == null) {
+ submitTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getSubmitTime(), getParentForChildren(), isClean());
+ submitTime_ = null;
+ }
+ return submitTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The enum numeric value on the wire for state.
+ */
+ int getStateValue();
+ /**
+ *
+ *
+ * + * The state of the operation. + *+ * + *
.google.cloud.translation.v3beta1.BatchTranslateDocumentMetadata.State state = 1;
+ *
+ * @return The state.
+ */
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentMetadata.State getState();
+
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 2;
+ *
+ * @return The totalPages.
+ */
+ long getTotalPages();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 3;
+ *
+ * @return The translatedPages.
+ */
+ long getTranslatedPages();
+
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents so far. Documents + * without clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 4;
+ *
+ * @return The failedPages.
+ */
+ long getFailedPages();
+
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) so far. + *+ * + *
int64 total_billable_pages = 5;
+ *
+ * @return The totalBillablePages.
+ */
+ long getTotalBillablePages();
+
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents so far. + *+ * + *
int64 total_characters = 6;
+ *
+ * @return The totalCharacters.
+ */
+ long getTotalCharacters();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents so far. + *+ * + *
int64 translated_characters = 7;
+ *
+ * @return The translatedCharacters.
+ */
+ long getTranslatedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents so far. + *+ * + *
int64 failed_characters = 8;
+ *
+ * @return The failedCharacters.
+ */
+ long getFailedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition (such as XLSX) so far. + *+ * + *
int64 total_billable_characters = 9;
+ *
+ * @return The totalBillableCharacters.
+ */
+ long getTotalBillableCharacters();
+
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ *
+ * @return The submitTime.
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 10;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+}
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
new file mode 100644
index 00000000..67c19b45
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentRequest.java
@@ -0,0 +1,2935 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * The BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentRequest} + */ +public final class BatchTranslateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateDocumentRequest) + BatchTranslateDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateDocumentRequest.newBuilder() to construct. + private BatchTranslateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateDocumentRequest() { + parent_ = ""; + sourceLanguageCode_ = ""; + targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inputConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchTranslateDocumentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateDocumentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceLanguageCode_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + targetLanguageCodes_.add(s); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + inputConfigs_ = + new java.util.ArrayList< + com.google.cloud.translate.v3beta1.BatchDocumentInputConfig>(); + mutable_bitField0_ |= 0x00000002; + } + inputConfigs_.add( + input.readMessage( + com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.parser(), + extensionRegistry)); + break; + } + case 42: + { + com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder subBuilder = + null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + models_ = + com.google.protobuf.MapField.newMapField(ModelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry
+ * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The sourceLanguageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LANGUAGE_CODES_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList targetLanguageCodes_;
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return A list containing the targetLanguageCodes.
+ */
+ public com.google.protobuf.ProtocolStringList getTargetLanguageCodesList() {
+ return targetLanguageCodes_;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The count of targetLanguageCodes.
+ */
+ public int getTargetLanguageCodesCount() {
+ return targetLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The targetLanguageCodes at the given index.
+ */
+ public java.lang.String getTargetLanguageCodes(int index) {
+ return targetLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the targetLanguageCodes at the given index.
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) {
+ return targetLanguageCodes_.getByteString(index);
+ }
+
+ public static final int INPUT_CONFIGS_FIELD_NUMBER = 4;
+ private java.util.List+ * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ return 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public int getInputConfigsCount() {
+ return inputConfigs_.size();
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig getInputConfigs(int index) {
+ return inputConfigs_.get(index);
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder
+ getInputConfigsOrBuilder(int index) {
+ return inputConfigs_.get(index);
+ }
+
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5;
+ private com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The outputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.getDefaultInstance()
+ : 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfigOrBuilder
+ getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ public static final int MODELS_FIELD_NUMBER = 6;
+
+ private static final class ModelsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public boolean containsModels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetModels().getMap().containsKey(key);
+ }
+ /** Use {@link #getModelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getModelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getModelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public boolean containsGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetGlossaries().getMap().containsKey(key);
+ }
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossaries() {
+ return getGlossariesMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossariesMap() {
+ return internalGetGlossaries().getMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * The BatchTranslateDocument request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The sourceLanguageCode.
+ */
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The sourceLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSourceLanguageCode() {
+
+ sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for sourceLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList targetLanguageCodes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureTargetLanguageCodesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(targetLanguageCodes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return A list containing the targetLanguageCodes.
+ */
+ public com.google.protobuf.ProtocolStringList getTargetLanguageCodesList() {
+ return targetLanguageCodes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The count of targetLanguageCodes.
+ */
+ public int getTargetLanguageCodesCount() {
+ return targetLanguageCodes_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The targetLanguageCodes at the given index.
+ */
+ public java.lang.String getTargetLanguageCodes(int index) {
+ return targetLanguageCodes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the targetLanguageCodes at the given index.
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index) {
+ return targetLanguageCodes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The targetLanguageCodes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetLanguageCodes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The targetLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addTargetLanguageCodes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param values The targetLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllTargetLanguageCodes(java.lang.Iterable+ * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetLanguageCodes() {
+ targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param value The bytes of the targetLanguageCodes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addTargetLanguageCodesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureTargetLanguageCodesIsMutable();
+ targetLanguageCodes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private java.util.List+ * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List+ * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public int getInputConfigsCount() {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.size();
+ } else {
+ return inputConfigsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig getInputConfigs(int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.BatchDocumentInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setInputConfigs(
+ int index,
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addInputConfigs(
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addInputConfigs(
+ int index, com.google.cloud.translate.v3beta1.BatchDocumentInputConfig value) {
+ if (inputConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, value);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addInputConfigs(
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addInputConfigs(
+ int index,
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder builderForValue) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder addAllInputConfigs(
+ java.lang.Iterable extends com.google.cloud.translate.v3beta1.BatchDocumentInputConfig>
+ values) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearInputConfigs() {
+ if (inputConfigsBuilder_ == null) {
+ inputConfigs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder removeInputConfigs(int index) {
+ if (inputConfigsBuilder_ == null) {
+ ensureInputConfigsIsMutable();
+ inputConfigs_.remove(index);
+ onChanged();
+ } else {
+ inputConfigsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder
+ getInputConfigsBuilder(int index) {
+ return getInputConfigsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder
+ getInputConfigsOrBuilder(int index) {
+ if (inputConfigsBuilder_ == null) {
+ return inputConfigs_.get(index);
+ } else {
+ return inputConfigsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List<
+ ? extends com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder>
+ getInputConfigsOrBuilderList() {
+ if (inputConfigsBuilder_ != null) {
+ return inputConfigsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder
+ addInputConfigsBuilder() {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.Builder
+ addInputConfigsBuilder(int index) {
+ return getInputConfigsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public java.util.List+ * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The outputConfig.
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeOutputConfig(
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.newBuilder(outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder
+ getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.BatchDocumentOutputConfigOrBuilder
+ getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.getDefaultInstance()
+ : 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig,
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig,
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ private com.google.protobuf.MapField+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public boolean containsModels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetModels().getMap().containsKey(key);
+ }
+ /** Use {@link #getModelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getModelsOrDefault(
+ java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getModelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder removeModels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableModels().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder putModels(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableModels().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder putAllModels(java.util.Map+ * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public boolean containsGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetGlossaries().getMap().containsKey(key);
+ }
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossaries() {
+ return getGlossariesMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getGlossariesMap() {
+ return internalGetGlossaries().getMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ map = internalGetGlossaries().getMap();
+ return map.containsKey(key) ? map.get(key) : defaultValue;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ map = internalGetGlossaries().getMap();
+ if (!map.containsKey(key)) {
+ throw new java.lang.IllegalArgumentException();
+ }
+ return map.get(key);
+ }
+
+ public Builder clearGlossaries() {
+ internalGetMutableGlossaries().getMutableMap().clear();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder removeGlossaries(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableGlossaries().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ getMutableGlossaries() {
+ return internalGetMutableGlossaries().getMutableMap();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder putGlossaries(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableGlossaries().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder putAllGlossaries(
+ java.util.Map<
+ java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig>
+ values) {
+ internalGetMutableGlossaries().getMutableMap().putAll(values);
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentRequest)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The sourceLanguageCode.
+ */
+ java.lang.String getSourceLanguageCode();
+ /**
+ *
+ *
+ * + * 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). + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ com.google.protobuf.ByteString getSourceLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return A list containing the targetLanguageCodes.
+ */
+ java.util.List+ * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The count of targetLanguageCodes.
+ */
+ int getTargetLanguageCodesCount();
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The targetLanguageCodes at the given index.
+ */
+ java.lang.String getTargetLanguageCodes(int index);
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document. Specify up to 10 language codes here. + *+ * + *
repeated string target_language_codes = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the targetLanguageCodes at the given index.
+ */
+ com.google.protobuf.ByteString getTargetLanguageCodesBytes(int index);
+
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ java.util.List+ * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfig getInputConfigs(int index);
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ int getInputConfigsCount();
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ java.util.List extends com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder>
+ getInputConfigsOrBuilderList();
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * repeated .google.cloud.translation.v3beta1.BatchDocumentInputConfig input_configs = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.translate.v3beta1.BatchDocumentInputConfigOrBuilder getInputConfigsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the outputConfig field is set.
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The outputConfig.
+ */
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfig getOutputConfig();
+ /**
+ *
+ *
+ * + * 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. + *+ * + *
+ * .google.cloud.translation.v3beta1.BatchDocumentOutputConfig output_config = 5 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.translate.v3beta1.BatchDocumentOutputConfigOrBuilder getOutputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ int getModelsCount();
+ /**
+ *
+ *
+ * + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ boolean containsModels(java.lang.String key);
+ /** Use {@link #getModelsMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.util.Map+ * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getModelsOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ * + * Optional. The models to use for translation. Map's key is target language + * code. Map's value is the model name. Value can be a built-in general model, + * or an AutoML Translation model. + * The value format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If the map is empty or a specific model is not requested for a language + * pair, then default google model (nmt) is used. + *+ * + *
map<string, string> models = 6 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getModelsOrThrow(java.lang.String key);
+
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ int getGlossariesCount();
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ boolean containsGlossaries(java.lang.String key);
+ /** Use {@link #getGlossariesMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ java.util.Map+ * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault(
+ java.lang.String key,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue);
+ /**
+ *
+ *
+ * + * Optional. Glossaries to be applied. It's keyed by target language code. + *+ * + *
+ * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrThrow(
+ java.lang.String key);
+}
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentResponse.java
new file mode 100644
index 00000000..1b8c94ef
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateDocumentResponse.java
@@ -0,0 +1,1785 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by BatchTranslateDocument if at least one document is + * translated successfully. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentResponse} + */ +public final class BatchTranslateDocumentResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateDocumentResponse) + BatchTranslateDocumentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchTranslateDocumentResponse.newBuilder() to construct. + private BatchTranslateDocumentResponse( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchTranslateDocumentResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchTranslateDocumentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchTranslateDocumentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + totalPages_ = input.readInt64(); + break; + } + case 16: + { + translatedPages_ = input.readInt64(); + break; + } + case 24: + { + failedPages_ = input.readInt64(); + break; + } + case 32: + { + totalBillablePages_ = input.readInt64(); + break; + } + case 40: + { + totalCharacters_ = input.readInt64(); + break; + } + case 48: + { + translatedCharacters_ = input.readInt64(); + break; + } + case 56: + { + failedCharacters_ = input.readInt64(); + break; + } + case 64: + { + totalBillableCharacters_ = input.readInt64(); + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (submitTime_ != null) { + subBuilder = submitTime_.toBuilder(); + } + submitTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(submitTime_); + submitTime_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse.class, + com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse.Builder.class); + } + + public static final int TOTAL_PAGES_FIELD_NUMBER = 1; + private long totalPages_; + /** + * + * + *
+ * Total number of pages to translate in all documents. Documents without a + * clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 1;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+
+ public static final int TRANSLATED_PAGES_FIELD_NUMBER = 2;
+ private long translatedPages_;
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 2;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+
+ public static final int FAILED_PAGES_FIELD_NUMBER = 3;
+ private long failedPages_;
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 3;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+
+ public static final int TOTAL_BILLABLE_PAGES_FIELD_NUMBER = 4;
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + *+ * + *
int64 total_billable_pages = 4;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+
+ public static final int TOTAL_CHARACTERS_FIELD_NUMBER = 5;
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents. + *+ * + *
int64 total_characters = 5;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+
+ public static final int TRANSLATED_CHARACTERS_FIELD_NUMBER = 6;
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + *+ * + *
int64 translated_characters = 6;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+
+ public static final int FAILED_CHARACTERS_FIELD_NUMBER = 7;
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + *+ * + *
int64 failed_characters = 7;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+
+ public static final int TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER = 8;
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + *+ * + *
int64 total_billable_characters = 8;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+
+ public static final int SUBMIT_TIME_FIELD_NUMBER = 9;
+ private com.google.protobuf.Timestamp submitTime_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasSubmitTime() {
+ return submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return The submitTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ return submitTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : submitTime_;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ return getSubmitTime();
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 10;
+ private com.google.protobuf.Timestamp endTime_;
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return Whether the endTime field is set.
+ */
+ @java.lang.Override
+ public boolean hasEndTime() {
+ return endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return The endTime.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getEndTime() {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ return getEndTime();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (totalPages_ != 0L) {
+ output.writeInt64(1, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ output.writeInt64(2, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ output.writeInt64(3, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ output.writeInt64(4, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ output.writeInt64(5, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ output.writeInt64(6, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ output.writeInt64(7, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ output.writeInt64(8, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ output.writeMessage(9, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ output.writeMessage(10, getEndTime());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (totalPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, totalPages_);
+ }
+ if (translatedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, translatedPages_);
+ }
+ if (failedPages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, failedPages_);
+ }
+ if (totalBillablePages_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalBillablePages_);
+ }
+ if (totalCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, totalCharacters_);
+ }
+ if (translatedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, translatedCharacters_);
+ }
+ if (failedCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, failedCharacters_);
+ }
+ if (totalBillableCharacters_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, totalBillableCharacters_);
+ }
+ if (submitTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getSubmitTime());
+ }
+ if (endTime_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getEndTime());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse other =
+ (com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse) obj;
+
+ if (getTotalPages() != other.getTotalPages()) return false;
+ if (getTranslatedPages() != other.getTranslatedPages()) return false;
+ if (getFailedPages() != other.getFailedPages()) return false;
+ if (getTotalBillablePages() != other.getTotalBillablePages()) return false;
+ if (getTotalCharacters() != other.getTotalCharacters()) return false;
+ if (getTranslatedCharacters() != other.getTranslatedCharacters()) return false;
+ if (getFailedCharacters() != other.getFailedCharacters()) return false;
+ if (getTotalBillableCharacters() != other.getTotalBillableCharacters()) return false;
+ if (hasSubmitTime() != other.hasSubmitTime()) return false;
+ if (hasSubmitTime()) {
+ if (!getSubmitTime().equals(other.getSubmitTime())) return false;
+ }
+ if (hasEndTime() != other.hasEndTime()) return false;
+ if (hasEndTime()) {
+ if (!getEndTime().equals(other.getEndTime())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalPages());
+ hash = (37 * hash) + TRANSLATED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedPages());
+ hash = (37 * hash) + FAILED_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedPages());
+ hash = (37 * hash) + TOTAL_BILLABLE_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillablePages());
+ hash = (37 * hash) + TOTAL_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCharacters());
+ hash = (37 * hash) + TRANSLATED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTranslatedCharacters());
+ hash = (37 * hash) + FAILED_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailedCharacters());
+ hash = (37 * hash) + TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillableCharacters());
+ if (hasSubmitTime()) {
+ hash = (37 * hash) + SUBMIT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getSubmitTime().hashCode();
+ }
+ if (hasEndTime()) {
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by BatchTranslateDocument if at least one document is + * translated successfully. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateDocumentResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Total number of pages to translate in all documents. Documents without a + * clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 1;
+ *
+ * @return The totalPages.
+ */
+ @java.lang.Override
+ public long getTotalPages() {
+ return totalPages_;
+ }
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents. Documents without a + * clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 1;
+ *
+ * @param value The totalPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalPages(long value) {
+
+ totalPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of pages to translate in all documents. Documents without a + * clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalPages() {
+
+ totalPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedPages_;
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 2;
+ *
+ * @return The translatedPages.
+ */
+ @java.lang.Override
+ public long getTranslatedPages() {
+ return translatedPages_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 2;
+ *
+ * @param value The translatedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedPages(long value) {
+
+ translatedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedPages() {
+
+ translatedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedPages_;
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 3;
+ *
+ * @return The failedPages.
+ */
+ @java.lang.Override
+ public long getFailedPages() {
+ return failedPages_;
+ }
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 3;
+ *
+ * @param value The failedPages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedPages(long value) {
+
+ failedPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedPages() {
+
+ failedPages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillablePages_;
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + *+ * + *
int64 total_billable_pages = 4;
+ *
+ * @return The totalBillablePages.
+ */
+ @java.lang.Override
+ public long getTotalBillablePages() {
+ return totalBillablePages_;
+ }
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + *+ * + *
int64 total_billable_pages = 4;
+ *
+ * @param value The totalBillablePages to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillablePages(long value) {
+
+ totalBillablePages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + *+ * + *
int64 total_billable_pages = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillablePages() {
+
+ totalBillablePages_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalCharacters_;
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents. + *+ * + *
int64 total_characters = 5;
+ *
+ * @return The totalCharacters.
+ */
+ @java.lang.Override
+ public long getTotalCharacters() {
+ return totalCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents. + *+ * + *
int64 total_characters = 5;
+ *
+ * @param value The totalCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalCharacters(long value) {
+
+ totalCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents. + *+ * + *
int64 total_characters = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalCharacters() {
+
+ totalCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long translatedCharacters_;
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + *+ * + *
int64 translated_characters = 6;
+ *
+ * @return The translatedCharacters.
+ */
+ @java.lang.Override
+ public long getTranslatedCharacters() {
+ return translatedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + *+ * + *
int64 translated_characters = 6;
+ *
+ * @param value The translatedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTranslatedCharacters(long value) {
+
+ translatedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + *+ * + *
int64 translated_characters = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTranslatedCharacters() {
+
+ translatedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long failedCharacters_;
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + *+ * + *
int64 failed_characters = 7;
+ *
+ * @return The failedCharacters.
+ */
+ @java.lang.Override
+ public long getFailedCharacters() {
+ return failedCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + *+ * + *
int64 failed_characters = 7;
+ *
+ * @param value The failedCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFailedCharacters(long value) {
+
+ failedCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + *+ * + *
int64 failed_characters = 7;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFailedCharacters() {
+
+ failedCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalBillableCharacters_;
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + *+ * + *
int64 total_billable_characters = 8;
+ *
+ * @return The totalBillableCharacters.
+ */
+ @java.lang.Override
+ public long getTotalBillableCharacters() {
+ return totalBillableCharacters_;
+ }
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + *+ * + *
int64 total_billable_characters = 8;
+ *
+ * @param value The totalBillableCharacters to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalBillableCharacters(long value) {
+
+ totalBillableCharacters_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + *+ * + *
int64 total_billable_characters = 8;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalBillableCharacters() {
+
+ totalBillableCharacters_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Timestamp submitTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ submitTimeBuilder_;
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ public boolean hasSubmitTime() {
+ return submitTimeBuilder_ != null || submitTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return The submitTime.
+ */
+ public com.google.protobuf.Timestamp getSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ } else {
+ return submitTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ submitTime_ = value;
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public Builder setSubmitTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ submitTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public Builder mergeSubmitTime(com.google.protobuf.Timestamp value) {
+ if (submitTimeBuilder_ == null) {
+ if (submitTime_ != null) {
+ submitTime_ =
+ com.google.protobuf.Timestamp.newBuilder(submitTime_).mergeFrom(value).buildPartial();
+ } else {
+ submitTime_ = value;
+ }
+ onChanged();
+ } else {
+ submitTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public Builder clearSubmitTime() {
+ if (submitTimeBuilder_ == null) {
+ submitTime_ = null;
+ onChanged();
+ } else {
+ submitTime_ = null;
+ submitTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public com.google.protobuf.Timestamp.Builder getSubmitTimeBuilder() {
+
+ onChanged();
+ return getSubmitTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() {
+ if (submitTimeBuilder_ != null) {
+ return submitTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return submitTime_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : submitTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getSubmitTimeFieldBuilder() {
+ if (submitTimeBuilder_ == null) {
+ submitTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getSubmitTime(), getParentForChildren(), isClean());
+ submitTime_ = null;
+ }
+ return submitTimeBuilder_;
+ }
+
+ private com.google.protobuf.Timestamp endTime_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ endTimeBuilder_;
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return Whether the endTime field is set.
+ */
+ public boolean hasEndTime() {
+ return endTimeBuilder_ != null || endTime_ != null;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return The endTime.
+ */
+ public com.google.protobuf.Timestamp getEndTime() {
+ if (endTimeBuilder_ == null) {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ } else {
+ return endTimeBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTime_ = value;
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimeBuilder_ == null) {
+ endTime_ = builderForValue.build();
+ onChanged();
+ } else {
+ endTimeBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
+ if (endTimeBuilder_ == null) {
+ if (endTime_ != null) {
+ endTime_ =
+ com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial();
+ } else {
+ endTime_ = value;
+ }
+ onChanged();
+ } else {
+ endTimeBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public Builder clearEndTime() {
+ if (endTimeBuilder_ == null) {
+ endTime_ = null;
+ onChanged();
+ } else {
+ endTime_ = null;
+ endTimeBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
+
+ onChanged();
+ return getEndTimeFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
+ if (endTimeBuilder_ != null) {
+ return endTimeBuilder_.getMessageOrBuilder();
+ } else {
+ return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimeFieldBuilder() {
+ if (endTimeBuilder_ == null) {
+ endTimeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTime(), getParentForChildren(), isClean());
+ endTime_ = null;
+ }
+ return endTimeBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateDocumentResponse)
+ private static final com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse();
+ }
+
+ public static com.google.cloud.translate.v3beta1.BatchTranslateDocumentResponse
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Total number of pages to translate in all documents. Documents without a + * clear page definition (such as XLSX) are not counted. + *+ * + *
int64 total_pages = 1;
+ *
+ * @return The totalPages.
+ */
+ long getTotalPages();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated pages in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 translated_pages = 2;
+ *
+ * @return The translatedPages.
+ */
+ long getTranslatedPages();
+
+ /**
+ *
+ *
+ * + * Number of pages that failed to process in all documents. Documents without + * a clear page definition (such as XLSX) are not counted. + *+ * + *
int64 failed_pages = 3;
+ *
+ * @return The failedPages.
+ */
+ long getFailedPages();
+
+ /**
+ *
+ *
+ * + * Number of billable pages in documents with clear page definition (such as + * PDF, DOCX, PPTX) + *+ * + *
int64 total_billable_pages = 4;
+ *
+ * @return The totalBillablePages.
+ */
+ long getTotalBillablePages();
+
+ /**
+ *
+ *
+ * + * Total number of characters (Unicode codepoints) in all documents. + *+ * + *
int64 total_characters = 5;
+ *
+ * @return The totalCharacters.
+ */
+ long getTotalCharacters();
+
+ /**
+ *
+ *
+ * + * Number of successfully translated characters (Unicode codepoints) in all + * documents. + *+ * + *
int64 translated_characters = 6;
+ *
+ * @return The translatedCharacters.
+ */
+ long getTranslatedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of characters that have failed to process (Unicode codepoints) in + * all documents. + *+ * + *
int64 failed_characters = 7;
+ *
+ * @return The failedCharacters.
+ */
+ long getFailedCharacters();
+
+ /**
+ *
+ *
+ * + * Number of billable characters (Unicode codepoints) in documents without + * clear page definition, such as XLSX. + *+ * + *
int64 total_billable_characters = 8;
+ *
+ * @return The totalBillableCharacters.
+ */
+ long getTotalBillableCharacters();
+
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return Whether the submitTime field is set.
+ */
+ boolean hasSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ *
+ * @return The submitTime.
+ */
+ com.google.protobuf.Timestamp getSubmitTime();
+ /**
+ *
+ *
+ * + * Time when the operation was submitted. + *+ * + *
.google.protobuf.Timestamp submit_time = 9;
+ */
+ com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder();
+
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return Whether the endTime field is set.
+ */
+ boolean hasEndTime();
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ *
+ * @return The endTime.
+ */
+ com.google.protobuf.Timestamp getEndTime();
+ /**
+ *
+ *
+ * + * The time when the operation is finished and + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. + *+ * + *
.google.protobuf.Timestamp end_time = 10;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder();
+}
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java
index 927206f6..7de25916 100644
--- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponse.java
@@ -22,8 +22,10 @@
*
*
* - * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by - * BatchTranslateText if at least one sentence is translated successfully. + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by BatchTranslateText if at least one sentence is translated + * successfully. ** * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateResponse} @@ -255,7 +257,8 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { * *
* The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -271,7 +274,8 @@ public boolean hasEndTime() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -287,7 +291,8 @@ public com.google.protobuf.Timestamp getEndTime() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -507,8 +512,10 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build
*
*
* - * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by - * BatchTranslateText if at least one sentence is translated successfully. + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by BatchTranslateText if at least one sentence is translated + * successfully. ** * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateResponse} @@ -1052,7 +1059,8 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { * *
* The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1067,7 +1075,8 @@ public boolean hasEndTime() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1086,7 +1095,8 @@ public com.google.protobuf.Timestamp getEndTime() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1109,7 +1119,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1129,7 +1140,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1154,7 +1166,8 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1175,7 +1188,8 @@ public Builder clearEndTime() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1190,7 +1204,8 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -1207,7 +1222,8 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() {
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponseOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponseOrBuilder.java
index 5ad4a445..0f69ba03 100644
--- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponseOrBuilder.java
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateResponseOrBuilder.java
@@ -102,7 +102,8 @@ public interface BatchTranslateResponseOrBuilder
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -115,7 +116,8 @@ public interface BatchTranslateResponseOrBuilder
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
@@ -128,7 +130,8 @@ public interface BatchTranslateResponseOrBuilder
*
* * The time when the operation is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *
.google.protobuf.Timestamp end_time = 5;
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 ea3bd74b..94d1a49a 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
@@ -232,7 +232,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) {
*
* * Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -262,7 +262,7 @@ public java.lang.String getParent() { * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -432,14 +432,14 @@ public int getModelsCount() { * ** - ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -464,14 +464,14 @@ public java.util.MapgetModels() { * * * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -487,14 +487,14 @@ public java.util.MapgetModelsMap() { * * * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -514,14 +514,14 @@ public java.lang.String getModelsOrDefault(java.lang.String key, java.lang.Strin * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -547,7 +547,7 @@ public java.lang.String getModelsOrThrow(java.lang.String key) { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -565,7 +565,7 @@ public java.util.ListgetInputCo * * * Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -584,7 +584,7 @@ public java.util.ListgetInputCo * * * Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -602,7 +602,7 @@ public int getInputConfigsCount() { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -620,7 +620,7 @@ public com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index) * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -1497,7 +1497,7 @@ public Builder mergeFrom( * ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -1526,7 +1526,7 @@ public java.lang.String getParent() { * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -1555,7 +1555,7 @@ public com.google.protobuf.ByteString getParentBytes() { * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -1583,7 +1583,7 @@ public Builder setParent(java.lang.String value) { * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -1607,7 +1607,7 @@ public Builder clearParent() { * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -1945,14 +1945,14 @@ public int getModelsCount() { * ** - ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -1977,14 +1977,14 @@ public java.util.MapgetModels() { * * * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2000,14 +2000,14 @@ public java.util.MapgetModelsMap() { * * * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2028,14 +2028,14 @@ public java.lang.String getModelsOrDefault( * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2063,14 +2063,14 @@ public Builder clearModels() { * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2094,14 +2094,14 @@ public java.util.MapgetMutableModels() { * * * Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2123,14 +2123,14 @@ public Builder putModels(java.lang.String key, java.lang.String value) { * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -2164,7 +2164,7 @@ private void ensureInputConfigsIsMutable() { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2185,7 +2185,7 @@ public java.util.ListgetInputCo * * * Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2206,7 +2206,7 @@ public int getInputConfigsCount() { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2227,7 +2227,7 @@ public com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index) * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2255,7 +2255,7 @@ public Builder setInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2280,7 +2280,7 @@ public Builder setInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2307,7 +2307,7 @@ public Builder addInputConfigs(com.google.cloud.translate.v3beta1.InputConfig va * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2335,7 +2335,7 @@ public Builder addInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2360,7 +2360,7 @@ public Builder addInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2385,7 +2385,7 @@ public Builder addInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2410,7 +2410,7 @@ public Builder addAllInputConfigs( * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2434,7 +2434,7 @@ public Builder clearInputConfigs() { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2458,7 +2458,7 @@ public Builder removeInputConfigs(int index) { * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2476,7 +2476,7 @@ public com.google.cloud.translate.v3beta1.InputConfig.Builder getInputConfigsBui * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2498,7 +2498,7 @@ public com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOr * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2520,7 +2520,7 @@ public com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOr * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2538,7 +2538,7 @@ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBui * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -2557,7 +2557,7 @@ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBui * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequestOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequestOrBuilder.java index 357e1ab0..8b5ecc1f 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequestOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/BatchTranslateTextRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -47,7 +47,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** - ** Required. Location to make a call. Must refer to a caller's project. - * Format: `projects/{project-id}/locations/{location-id}`. + * 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) @@ -147,14 +147,14 @@ public interface BatchTranslateTextRequestOrBuilder * ** - ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -167,14 +167,14 @@ public interface BatchTranslateTextRequestOrBuilder * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -190,14 +190,14 @@ public interface BatchTranslateTextRequestOrBuilder * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -210,14 +210,14 @@ public interface BatchTranslateTextRequestOrBuilder * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -230,14 +230,14 @@ public interface BatchTranslateTextRequestOrBuilder * ** Optional. The models to use for translation. Map's key is target language - * code. Map's value is model name. Value can be a built-in general model, + * code. Map's value is the model name. Value can be a built-in general model, * or an AutoML Translation model. * The value format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * If the map is empty or a specific model is * not requested for a language pair, then default google model (nmt) is used. *@@ -251,7 +251,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -266,7 +266,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -281,7 +281,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -296,7 +296,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *@@ -312,7 +312,7 @@ public interface BatchTranslateTextRequestOrBuilder * ** Required. Input configurations. - * The total number of files matched should be <= 1000. + * The total number of files matched should be <= 100. * The total content size should be <= 100M Unicode codepoints. * The files must use UTF-8 encoding. *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 12d30800..a5419c1c 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 @@ -22,8 +22,9 @@ * * *- * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by - * CreateGlossary. + * Stored in the + * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] + * field returned by CreateGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryMetadata} @@ -686,8 +687,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *- * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by - * CreateGlossary. + * Stored in the + * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] + * field returned by CreateGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.CreateGlossaryMetadata} 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 93c2fa63..5a535324 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 @@ -22,8 +22,9 @@ * * *- * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by - * DeleteGlossary. + * Stored in the + * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] + * field returned by DeleteGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryMetadata} @@ -686,8 +687,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *- * Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by - * DeleteGlossary. + * Stored in the + * [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] + * field returned by DeleteGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryMetadata} 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 5b5a83a7..09f53096 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 @@ -22,8 +22,9 @@ * * *- * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by - * DeleteGlossary. + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by DeleteGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryResponse} @@ -244,7 +245,8 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -260,7 +262,8 @@ public boolean hasEndTime() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -276,7 +279,8 @@ public com.google.protobuf.Timestamp getEndTime() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -478,8 +482,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *- * Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by - * DeleteGlossary. + * Stored in the + * [google.longrunning.Operation.response][google.longrunning.Operation.response] + * field returned by DeleteGlossary. ** * Protobuf type {@code google.cloud.translation.v3beta1.DeleteGlossaryResponse} @@ -962,7 +967,8 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -977,7 +983,8 @@ public boolean hasEndTime() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -996,7 +1003,8 @@ public com.google.protobuf.Timestamp getEndTime() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1019,7 +1027,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1039,7 +1048,8 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1064,7 +1074,8 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1085,7 +1096,8 @@ public Builder clearEndTime() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1100,7 +1112,8 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -1117,7 +1130,8 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponseOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponseOrBuilder.java index d36f3168..2309505d 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponseOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DeleteGlossaryResponseOrBuilder.java @@ -88,7 +88,8 @@ public interface DeleteGlossaryResponseOrBuilder * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -101,7 +102,8 @@ public interface DeleteGlossaryResponseOrBuilder * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
@@ -114,7 +116,8 @@ public interface DeleteGlossaryResponseOrBuilder * ** The time when the glossary deletion is finished and - * [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + * [google.longrunning.Operation.done][google.longrunning.Operation.done] is + * set to true. ** *.google.protobuf.Timestamp end_time = 3;
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 7b48d739..c237aa25 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 @@ -211,11 +211,11 @@ public SourceCase getSourceCase() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -243,11 +243,11 @@ public java.lang.String getParent() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -278,9 +278,9 @@ public com.google.protobuf.ByteString getParentBytes() { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -306,9 +306,9 @@ public java.lang.String getModel() { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -487,7 +487,7 @@ public int getLabelsCount() { * See https://cloud.google.com/translate/docs/labels for more information. *map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public boolean containsLabels(java.lang.String key) { @@ -514,7 +514,7 @@ public java.util.MapgetLabels() { * See https://cloud.google.com/translate/docs/labels for more information. * map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.util.MapgetLabelsMap() { @@ -532,7 +532,7 @@ public java.util.Map getLabelsMap() { * See https://cloud.google.com/translate/docs/labels for more information. * map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { @@ -554,7 +554,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * See https://cloud.google.com/translate/docs/labels for more information. *map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { @@ -1025,11 +1025,11 @@ public Builder clearSource() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -1056,11 +1056,11 @@ public java.lang.String getParent() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -1087,11 +1087,11 @@ public com.google.protobuf.ByteString getParentBytes() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -1117,11 +1117,11 @@ public Builder setParent(java.lang.String value) { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -1143,11 +1143,11 @@ public Builder clearParent() { ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -1176,9 +1176,9 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -1203,9 +1203,9 @@ public java.lang.String getModel() { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -1230,9 +1230,9 @@ public com.google.protobuf.ByteString getModelBytes() { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -1256,9 +1256,9 @@ public Builder setModel(java.lang.String value) { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -1278,9 +1278,9 @@ public Builder clearModel() { ** Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -1582,7 +1582,7 @@ public int getLabelsCount() { * See https://cloud.google.com/translate/docs/labels for more information. *map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public boolean containsLabels(java.lang.String key) { @@ -1609,7 +1609,7 @@ public java.util.MapgetLabels() { * See https://cloud.google.com/translate/docs/labels for more information. * map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.util.MapgetLabelsMap() { @@ -1627,7 +1627,7 @@ public java.util.Map getLabelsMap() { * See https://cloud.google.com/translate/docs/labels for more information. * map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.lang.String getLabelsOrDefault( @@ -1650,7 +1650,7 @@ public java.lang.String getLabelsOrDefault( * See https://cloud.google.com/translate/docs/labels for more information. *map<string, string> labels = 6;
+ *map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { @@ -1680,7 +1680,7 @@ public Builder clearLabels() { * See https://cloud.google.com/translate/docs/labels for more information. *
map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder removeLabels(java.lang.String key) {
if (key == null) {
@@ -1706,7 +1706,7 @@ public java.util.Mapmap<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder putLabels(java.lang.String key, java.lang.String value) {
if (key == null) {
@@ -1730,7 +1730,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) {
* See https://cloud.google.com/translate/docs/labels for more information.
*
*
- * map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
public Builder putAllLabels(java.util.Map* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -50,11 +50,11 @@ public interface DetectLanguageRequestOrBuilder *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}/locations/{location-id}` or - * `projects/{project-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. - * Only models within the same region (has same location-id) can be used. + * Format: `projects/{project-number-or-id}/locations/{location-id}` or + * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Only models within the same region, which have the same location-id, can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. ** @@ -72,9 +72,9 @@ public interface DetectLanguageRequestOrBuilder *
* Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -89,9 +89,9 @@ public interface DetectLanguageRequestOrBuilder *
* Optional. The language detection model to be used. * Format: - * `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` * Only one language detection model is currently supported: - * `projects/{project-id}/locations/{location-id}/models/language-detection/default`. + * `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. * If not specified, the default model is used. ** @@ -177,7 +177,7 @@ public interface DetectLanguageRequestOrBuilder * See https://cloud.google.com/translate/docs/labels for more information. * * - *
map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
int getLabelsCount();
/**
@@ -192,7 +192,7 @@ public interface DetectLanguageRequestOrBuilder
* See https://cloud.google.com/translate/docs/labels for more information.
*
*
- * map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
boolean containsLabels(java.lang.String key);
/** Use {@link #getLabelsMap()} instead. */
@@ -210,7 +210,7 @@ public interface DetectLanguageRequestOrBuilder
* See https://cloud.google.com/translate/docs/labels for more information.
*
*
- * map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
java.util.Mapmap<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue);
/**
@@ -240,7 +240,7 @@ public interface DetectLanguageRequestOrBuilder
* See https://cloud.google.com/translate/docs/labels for more information.
*
*
- * map<string, string> labels = 6;
+ * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
*/
java.lang.String getLabelsOrThrow(java.lang.String key);
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
new file mode 100644
index 00000000..17e1f527
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentInputConfig.java
@@ -0,0 +1,1223 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A document translation request input config. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentInputConfig} + */ +public final class DocumentInputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DocumentInputConfig) + DocumentInputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentInputConfig.newBuilder() to construct. + private DocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DocumentInputConfig() { + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentInputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DocumentInputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sourceCase_ = 1; + source_ = input.readBytes(); + break; + } + case 18: + { + com.google.cloud.translate.v3beta1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = ((com.google.cloud.translate.v3beta1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.translate.v3beta1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DocumentInputConfig.class, + com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CONTENT(1), + GCS_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 1: + return CONTENT; + case 2: + return GCS_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + /** + * + * + *
+ * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return Whether the content field is set.
+ */
+ @java.lang.Override
+ public boolean hasContent() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return The content.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getContent() {
+ if (sourceCase_ == 1) {
+ return (com.google.protobuf.ByteString) source_;
+ }
+ return com.google.protobuf.ByteString.EMPTY;
+ }
+
+ public static final int GCS_SOURCE_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+
+ public static final int MIME_TYPE_FIELD_NUMBER = 4;
+ private volatile java.lang.Object mimeType_;
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The mimeType.
+ */
+ @java.lang.Override
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The bytes for mimeType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (sourceCase_ == 1) {
+ output.writeBytes(1, (com.google.protobuf.ByteString) source_);
+ }
+ if (sourceCase_ == 2) {
+ output.writeMessage(2, (com.google.cloud.translate.v3beta1.GcsSource) source_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (sourceCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeBytesSize(
+ 1, (com.google.protobuf.ByteString) source_);
+ }
+ if (sourceCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, (com.google.cloud.translate.v3beta1.GcsSource) source_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DocumentInputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DocumentInputConfig other =
+ (com.google.cloud.translate.v3beta1.DocumentInputConfig) obj;
+
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!getSourceCase().equals(other.getSourceCase())) return false;
+ switch (sourceCase_) {
+ case 1:
+ if (!getContent().equals(other.getContent())) return false;
+ break;
+ case 2:
+ if (!getGcsSource().equals(other.getGcsSource())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ switch (sourceCase_) {
+ case 1:
+ hash = (37 * hash) + CONTENT_FIELD_NUMBER;
+ hash = (53 * hash) + getContent().hashCode();
+ break;
+ case 2:
+ hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsSource().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.DocumentInputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A document translation request input config. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentInputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return Whether the content field is set.
+ */
+ public boolean hasContent() {
+ return sourceCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return The content.
+ */
+ public com.google.protobuf.ByteString getContent() {
+ if (sourceCase_ == 1) {
+ return (com.google.protobuf.ByteString) source_;
+ }
+ return com.google.protobuf.ByteString.EMPTY;
+ }
+ /**
+ *
+ *
+ * + * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @param value The content to set.
+ * @return This builder for chaining.
+ */
+ public Builder setContent(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ sourceCase_ = 1;
+ source_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearContent() {
+ if (sourceCase_ == 1) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ gcsSourceBuilder_;
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsSource() {
+ return sourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return The gcsSource.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSource getGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ } else {
+ if (sourceCase_ == 2) {
+ return gcsSourceBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder setGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ source_ = value;
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder setGcsSource(
+ com.google.cloud.translate.v3beta1.GcsSource.Builder builderForValue) {
+ if (gcsSourceBuilder_ == null) {
+ source_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsSourceBuilder_.setMessage(builderForValue.build());
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder mergeGcsSource(com.google.cloud.translate.v3beta1.GcsSource value) {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2
+ && source_ != com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance()) {
+ source_ =
+ com.google.cloud.translate.v3beta1.GcsSource.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ source_ = value;
+ }
+ onChanged();
+ } else {
+ if (sourceCase_ == 2) {
+ gcsSourceBuilder_.mergeFrom(value);
+ }
+ gcsSourceBuilder_.setMessage(value);
+ }
+ sourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public Builder clearGcsSource() {
+ if (gcsSourceBuilder_ == null) {
+ if (sourceCase_ == 2) {
+ sourceCase_ = 0;
+ source_ = null;
+ onChanged();
+ }
+ } else {
+ if (sourceCase_ == 2) {
+ sourceCase_ = 0;
+ source_ = null;
+ }
+ gcsSourceBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ public com.google.cloud.translate.v3beta1.GcsSource.Builder getGcsSourceBuilder() {
+ return getGcsSourceFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() {
+ if ((sourceCase_ == 2) && (gcsSourceBuilder_ != null)) {
+ return gcsSourceBuilder_.getMessageOrBuilder();
+ } else {
+ if (sourceCase_ == 2) {
+ return (com.google.cloud.translate.v3beta1.GcsSource) source_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>
+ getGcsSourceFieldBuilder() {
+ if (gcsSourceBuilder_ == null) {
+ if (!(sourceCase_ == 2)) {
+ source_ = com.google.cloud.translate.v3beta1.GcsSource.getDefaultInstance();
+ }
+ gcsSourceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsSource,
+ com.google.cloud.translate.v3beta1.GcsSource.Builder,
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder>(
+ (com.google.cloud.translate.v3beta1.GcsSource) source_,
+ getParentForChildren(),
+ isClean());
+ source_ = null;
+ }
+ sourceCase_ = 2;
+ onChanged();
+ ;
+ return gcsSourceBuilder_;
+ }
+
+ private java.lang.Object mimeType_ = "";
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The mimeType.
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The bytes for mimeType.
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @param value The mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @param value The bytes for mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DocumentInputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DocumentInputConfig)
+ private static final com.google.cloud.translate.v3beta1.DocumentInputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DocumentInputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentInputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return Whether the content field is set.
+ */
+ boolean hasContent();
+ /**
+ *
+ *
+ * + * Document's content represented as a stream of bytes. + *+ * + *
bytes content = 1;
+ *
+ * @return The content.
+ */
+ com.google.protobuf.ByteString getContent();
+
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return Whether the gcsSource field is set.
+ */
+ boolean hasGcsSource();
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ *
+ * @return The gcsSource.
+ */
+ com.google.cloud.translate.v3beta1.GcsSource getGcsSource();
+ /**
+ *
+ *
+ * + * Google Cloud Storage location. This must be a single file. + * For example: gs://example_bucket/example_file.pdf + *+ * + *
.google.cloud.translation.v3beta1.GcsSource gcs_source = 2;
+ */
+ com.google.cloud.translate.v3beta1.GcsSourceOrBuilder getGcsSourceOrBuilder();
+
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The mimeType.
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * Specifies the input document's mime_type. + * If not specified it will be determined using the file extension for + * gcs_source provided files. For a file provided through bytes content the + * mime_type must be provided. + * Currently supported mime types are: + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 4;
+ *
+ * @return The bytes for mimeType.
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+
+ public com.google.cloud.translate.v3beta1.DocumentInputConfig.SourceCase getSourceCase();
+}
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
new file mode 100644
index 00000000..2be0d86c
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentOutputConfig.java
@@ -0,0 +1,1496 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A document translation request output config. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentOutputConfig} + */ +public final class DocumentOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DocumentOutputConfig) + DocumentOutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentOutputConfig.newBuilder() to construct. + private DocumentOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DocumentOutputConfig() { + mimeType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DocumentOutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.translate.v3beta1.GcsDestination) destination_).toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.translate.v3beta1.GcsDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.translate.v3beta1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.DocumentOutputConfig.class, + com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+ * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+
+ public static final int MIME_TYPE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object mimeType_;
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The mimeType.
+ */
+ @java.lang.Override
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for mimeType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (destinationCase_ == 1) {
+ output.writeMessage(1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mimeType_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (destinationCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.cloud.translate.v3beta1.GcsDestination) destination_);
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mimeType_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DocumentOutputConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig other =
+ (com.google.cloud.translate.v3beta1.DocumentOutputConfig) obj;
+
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!getDestinationCase().equals(other.getDestinationCase())) return false;
+ switch (destinationCase_) {
+ case 1:
+ if (!getGcsDestination().equals(other.getGcsDestination())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ switch (destinationCase_) {
+ case 1:
+ hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
+ hash = (53 * hash) + getGcsDestination().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A document translation request output config. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentOutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ @java.lang.Override
+ public boolean hasGcsDestination() {
+ return destinationCase_ == 1;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The gcsDestination.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ } else {
+ if (destinationCase_ == 1) {
+ return gcsDestinationBuilder_.getMessage();
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ destination_ = value;
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGcsDestination(
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder builderForValue) {
+ if (gcsDestinationBuilder_ == null) {
+ destination_ = builderForValue.build();
+ onChanged();
+ } else {
+ gcsDestinationBuilder_.setMessage(builderForValue.build());
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestination value) {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1
+ && destination_
+ != com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance()) {
+ destination_ =
+ com.google.cloud.translate.v3beta1.GcsDestination.newBuilder(
+ (com.google.cloud.translate.v3beta1.GcsDestination) destination_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ destination_ = value;
+ }
+ onChanged();
+ } else {
+ if (destinationCase_ == 1) {
+ gcsDestinationBuilder_.mergeFrom(value);
+ }
+ gcsDestinationBuilder_.setMessage(value);
+ }
+ destinationCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearGcsDestination() {
+ if (gcsDestinationBuilder_ == null) {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ onChanged();
+ }
+ } else {
+ if (destinationCase_ == 1) {
+ destinationCase_ = 0;
+ destination_ = null;
+ }
+ gcsDestinationBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinationBuilder() {
+ return getGcsDestinationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
+ if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) {
+ return gcsDestinationBuilder_.getMessageOrBuilder();
+ } else {
+ if (destinationCase_ == 1) {
+ return (com.google.cloud.translate.v3beta1.GcsDestination) destination_;
+ }
+ return com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>
+ getGcsDestinationFieldBuilder() {
+ if (gcsDestinationBuilder_ == null) {
+ if (!(destinationCase_ == 1)) {
+ destination_ = com.google.cloud.translate.v3beta1.GcsDestination.getDefaultInstance();
+ }
+ gcsDestinationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.GcsDestination,
+ com.google.cloud.translate.v3beta1.GcsDestination.Builder,
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder>(
+ (com.google.cloud.translate.v3beta1.GcsDestination) destination_,
+ getParentForChildren(),
+ isClean());
+ destination_ = null;
+ }
+ destinationCase_ = 1;
+ onChanged();
+ ;
+ return gcsDestinationBuilder_;
+ }
+
+ private java.lang.Object mimeType_ = "";
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The mimeType.
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for mimeType.
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DocumentOutputConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DocumentOutputConfig)
+ private static final com.google.cloud.translate.v3beta1.DocumentOutputConfig DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DocumentOutputConfig();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentOutputConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the gcsDestination field is set.
+ */
+ boolean hasGcsDestination();
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The gcsDestination.
+ */
+ com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination();
+ /**
+ *
+ *
+ * + * Optional. Google Cloud Storage destination for the translation output, + * e.g., `gs://my_bucket/my_directory/`. + * The destination directory provided does not have to be empty, but the + * bucket must exist. If a file with the same name as the output file + * already exists in the destination an error will be returned. + * For a DocumentInputConfig.contents provided document, the output file + * will have the name "output_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * For a DocumentInputConfig.gcs_uri provided document, the output file will + * have a name according to its URI. For example: an input file with URI: + * "gs://a/b/c.[extension]" stored in a gcs_destination bucket with name + * "my_bucket" will have an output URI: + * "gs://my_bucket/a_b_c_[trg]_translations.[ext]", where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If the document was directly provided through the request, then the + * output document will have the format: + * "gs://my_bucket/translated_document_[trg]_translations.[ext], where + * - [trg] corresponds to the translated file's language code, + * - [ext] corresponds to the translated file's extension according to its + * mime type. + * If a glossary was provided, then the output URI for the glossary + * translation will be equal to the default output URI but have + * `glossary_translations` instead of `translations`. For the previous + * example, its glossary URI would be: + * "gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]". + * Thus the max number of output files will be 2 (Translated document, + * Glossary translated document). + * Callers should expect no partial outputs. If there is any error during + * document translation, no output will be stored in the Cloud Storage + * bucket. + *+ * + *
+ * .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The mimeType.
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * Optional. Specifies the translated document's mime_type. + * If not specified, the translated file's mime type will be the same as the + * input file's mime type. + * Currently only support the output mime type to be the same as input mime + * type. + * - application/pdf + * - application/vnd.openxmlformats-officedocument.wordprocessingml.document + * - application/vnd.openxmlformats-officedocument.presentationml.presentation + * - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet + *+ * + *
string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for mimeType.
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfig.DestinationCase
+ getDestinationCase();
+}
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
new file mode 100644
index 00000000..e39d786c
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/DocumentTranslation.java
@@ -0,0 +1,1097 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A translated document message. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentTranslation} + */ +public final class DocumentTranslation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.DocumentTranslation) + DocumentTranslationOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocumentTranslation.newBuilder() to construct. + private DocumentTranslation(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DocumentTranslation() { + byteStreamOutputs_ = java.util.Collections.emptyList(); + mimeType_ = ""; + detectedLanguageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DocumentTranslation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DocumentTranslation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + byteStreamOutputs_ = new java.util.ArrayList
+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return A list containing the byteStreamOutputs.
+ */
+ @java.lang.Override
+ public java.util.List+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return The count of byteStreamOutputs.
+ */
+ public int getByteStreamOutputsCount() {
+ return byteStreamOutputs_.size();
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The byteStreamOutputs at the given index.
+ */
+ public com.google.protobuf.ByteString getByteStreamOutputs(int index) {
+ return byteStreamOutputs_.get(index);
+ }
+
+ public static final int MIME_TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object mimeType_;
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ @java.lang.Override
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DETECTED_LANGUAGE_CODE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object detectedLanguageCode_;
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The detectedLanguageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getDetectedLanguageCode() {
+ java.lang.Object ref = detectedLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ detectedLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The bytes for detectedLanguageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDetectedLanguageCodeBytes() {
+ java.lang.Object ref = detectedLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ detectedLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < byteStreamOutputs_.size(); i++) {
+ output.writeBytes(1, byteStreamOutputs_.get(i));
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_);
+ }
+ if (!getDetectedLanguageCodeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detectedLanguageCode_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < byteStreamOutputs_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeBytesSizeNoTag(byteStreamOutputs_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getByteStreamOutputsList().size();
+ }
+ if (!getMimeTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_);
+ }
+ if (!getDetectedLanguageCodeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, detectedLanguageCode_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.DocumentTranslation)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.DocumentTranslation other =
+ (com.google.cloud.translate.v3beta1.DocumentTranslation) obj;
+
+ if (!getByteStreamOutputsList().equals(other.getByteStreamOutputsList())) return false;
+ if (!getMimeType().equals(other.getMimeType())) return false;
+ if (!getDetectedLanguageCode().equals(other.getDetectedLanguageCode())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getByteStreamOutputsCount() > 0) {
+ hash = (37 * hash) + BYTE_STREAM_OUTPUTS_FIELD_NUMBER;
+ hash = (53 * hash) + getByteStreamOutputsList().hashCode();
+ }
+ hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMimeType().hashCode();
+ hash = (37 * hash) + DETECTED_LANGUAGE_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getDetectedLanguageCode().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.DocumentTranslation prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A translated document message. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.DocumentTranslation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return A list containing the byteStreamOutputs.
+ */
+ public java.util.List+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return The count of byteStreamOutputs.
+ */
+ public int getByteStreamOutputsCount() {
+ return byteStreamOutputs_.size();
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The byteStreamOutputs at the given index.
+ */
+ public com.google.protobuf.ByteString getByteStreamOutputs(int index) {
+ return byteStreamOutputs_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param index The index to set the value at.
+ * @param value The byteStreamOutputs to set.
+ * @return This builder for chaining.
+ */
+ public Builder setByteStreamOutputs(int index, com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureByteStreamOutputsIsMutable();
+ byteStreamOutputs_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param value The byteStreamOutputs to add.
+ * @return This builder for chaining.
+ */
+ public Builder addByteStreamOutputs(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureByteStreamOutputsIsMutable();
+ byteStreamOutputs_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param values The byteStreamOutputs to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllByteStreamOutputs(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureByteStreamOutputsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, byteStreamOutputs_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearByteStreamOutputs() {
+ byteStreamOutputs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object mimeType_ = "";
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ public java.lang.String getMimeType() {
+ java.lang.Object ref = mimeType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ mimeType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ public com.google.protobuf.ByteString getMimeTypeBytes() {
+ java.lang.Object ref = mimeType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ mimeType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @param value The mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMimeType() {
+
+ mimeType_ = getDefaultInstance().getMimeType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @param value The bytes for mimeType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ mimeType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object detectedLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The detectedLanguageCode.
+ */
+ public java.lang.String getDetectedLanguageCode() {
+ java.lang.Object ref = detectedLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ detectedLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The bytes for detectedLanguageCode.
+ */
+ public com.google.protobuf.ByteString getDetectedLanguageCodeBytes() {
+ java.lang.Object ref = detectedLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ detectedLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @param value The detectedLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDetectedLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ detectedLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDetectedLanguageCode() {
+
+ detectedLanguageCode_ = getDefaultInstance().getDetectedLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @param value The bytes for detectedLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDetectedLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ detectedLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.DocumentTranslation)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DocumentTranslation)
+ private static final com.google.cloud.translate.v3beta1.DocumentTranslation DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.DocumentTranslation();
+ }
+
+ public static com.google.cloud.translate.v3beta1.DocumentTranslation getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return A list containing the byteStreamOutputs.
+ */
+ java.util.List+ * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @return The count of byteStreamOutputs.
+ */
+ int getByteStreamOutputsCount();
+ /**
+ *
+ *
+ * + * The array of translated documents. It is expected to be size 1 for now. We + * may produce multiple translated documents in the future for other type of + * file formats. + *+ * + *
repeated bytes byte_stream_outputs = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The byteStreamOutputs at the given index.
+ */
+ com.google.protobuf.ByteString getByteStreamOutputs(int index);
+
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The mimeType.
+ */
+ java.lang.String getMimeType();
+ /**
+ *
+ *
+ * + * The translated document's mime type. + *+ * + *
string mime_type = 2;
+ *
+ * @return The bytes for mimeType.
+ */
+ com.google.protobuf.ByteString getMimeTypeBytes();
+
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The detectedLanguageCode.
+ */
+ java.lang.String getDetectedLanguageCode();
+ /**
+ *
+ *
+ * + * The detected language for the input document. + * If the user did not provide the source language for the input document, + * this field will have the language code automatically detected. If the + * source language was passed, auto-detection of the language does not occur + * and this field is empty. + *+ * + *
string detected_language_code = 3;
+ *
+ * @return The bytes for detectedLanguageCode.
+ */
+ com.google.protobuf.ByteString getDetectedLanguageCodeBytes();
+}
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 ce4c8fd3..82ae8900 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
@@ -135,10 +135,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* * Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -168,10 +168,10 @@ public java.lang.String getParent() { *@@ -676,10 +676,10 @@ public Builder mergeFrom( ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -258,10 +258,10 @@ public com.google.protobuf.ByteString getDisplayLanguageCodeBytes() { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *@@ -289,10 +289,10 @@ public java.lang.String getModel() { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -708,10 +708,10 @@ public java.lang.String getParent() { *diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequestOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequestOrBuilder.java index d4c7bcca..5fed14a8 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequestOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GetSupportedLanguagesRequestOrBuilder.java @@ -29,10 +29,10 @@ public interface GetSupportedLanguagesRequestOrBuilder ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -740,10 +740,10 @@ public com.google.protobuf.ByteString getParentBytes() { *@@ -1063,10 +1063,10 @@ public Builder clearModel() { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -771,10 +771,10 @@ public Builder setParent(java.lang.String value) { *@@ -1038,10 +1038,10 @@ public Builder setModel(java.lang.String value) { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -798,10 +798,10 @@ public Builder clearParent() { *@@ -1009,10 +1009,10 @@ public com.google.protobuf.ByteString getModelBytes() { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -949,10 +949,10 @@ public Builder setDisplayLanguageCodeBytes(com.google.protobuf.ByteString value) * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *@@ -979,10 +979,10 @@ public java.lang.String getModel() { * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -51,10 +51,10 @@ public interface GetSupportedLanguagesRequestOrBuilder *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 adbf75aa..d7868796 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 @@ -1960,7 +1960,7 @@ public LanguagesCase getLanguagesCase() { * ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for AutoML models. * Only models within the same region (have same location-id) can be used, * otherwise an INVALID_ARGUMENT (400) error is returned. @@ -104,10 +104,10 @@ public interface GetSupportedLanguagesRequestOrBuilder * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *@@ -124,10 +124,10 @@ public interface GetSupportedLanguagesRequestOrBuilder * Optional. Get supported languages of this model. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * Returns languages supported by the specified model. * If missing, we get supported languages of Google general base (PBMT) model. *
* Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -1984,7 +1984,7 @@ public java.lang.String getName() {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -2787,7 +2787,7 @@ public Builder clearLanguages() {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -2810,7 +2810,7 @@ public java.lang.String getName() {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -2833,7 +2833,7 @@ public com.google.protobuf.ByteString getNameBytes() {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -2855,7 +2855,7 @@ public Builder setName(java.lang.String value) {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -2873,7 +2873,7 @@ public Builder clearName() {
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryOrBuilder.java
index 7c99a83e..80ef4b59 100644
--- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryOrBuilder.java
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/GlossaryOrBuilder.java
@@ -28,7 +28,7 @@ public interface GlossaryOrBuilder
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
@@ -41,7 +41,7 @@ public interface GlossaryOrBuilder
*
* * Required. The resource name of the glossary. Glossary names have the form - * `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + * `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. ** *
string name = 1 [(.google.api.field_behavior) = REQUIRED];
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 cc6f9188..1ea16f21 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
@@ -266,7 +266,20 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
* * Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -291,7 +304,20 @@ public java.lang.String getFilter() { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -976,7 +1002,20 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -1000,7 +1039,20 @@ public java.lang.String getFilter() { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -1024,7 +1076,20 @@ public com.google.protobuf.ByteString getFilterBytes() { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -1047,7 +1112,20 @@ public Builder setFilter(java.lang.String value) { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -1066,7 +1144,20 @@ public Builder clearFilter() { * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequestOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequestOrBuilder.java index ebed1824..c84335be 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequestOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/ListGlossariesRequestOrBuilder.java @@ -102,7 +102,20 @@ public interface ListGlossariesRequestOrBuilder * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** @@ -116,7 +129,20 @@ public interface ListGlossariesRequestOrBuilder * *
* Optional. Filter specifying constraints of a list operation. - * Filtering is not supported yet, and the parameter currently has no effect. + * Specify the constraint by the format of "key=value", where key must be + * "src" or "tgt", and the value must be a valid language code. + * For multiple restrictions, concatenate them by "AND" (uppercase only), + * such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used + * here, which means using 'en-US' and 'en' can lead to different results, + * which depends on the language code you used when you create the glossary. + * For the unidirectional glossaries, the "src" and "tgt" add restrictions + * on the source and target language code separately. + * For the equivalent term set glossaries, the "src" and/or "tgt" add + * restrictions on the term set. + * For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional + * glossaries which exactly match the source language code as "en-US" and the + * target language code "zh-CN", but all equivalent term set glossaries which + * contain "en-US" and "zh-CN" in their language set will be picked. * If missing, no filtering is performed. ** diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfig.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfig.java index 5999bbc1..10814718 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfig.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfig.java @@ -193,11 +193,15 @@ public DestinationCase getDestinationCase() { * strings if the input_file is tsv. They could also be empty if we have no * content to output. * Once a row is present in index.csv, the input/output matching never - * changes. Callers should also expect all the content in input_file are + * changes. Callers should also expect the contents in the input_file are * processed and ready to be consumed (that is, no partial output file is * written). + * Since index.csv will be updated during the process, please make + * sure there is no custom retention policy applied on the output bucket + * that may prevent file updating. + * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) * The format of translations_file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_translations.[extension]` + * gs://translation_test/a_b_c_'trg'_translations.[extension] * If the input file extension is tsv, the output has the following * columns: * Column 1: ID of the request provided in the input, if it's not @@ -212,9 +216,9 @@ public DestinationCase getDestinationCase() { * If input file extension is a txt or html, the translation is directly * written to the output file. If glossary is requested, a separate * glossary_translations_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` + * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension] * The format of errors file (for target language code 'trg') is: - * `gs://translation_test/a_b_c_'trg'_errors.[extension]` + * gs://translation_test/a_b_c_'trg'_errors.[extension] * If the input file extension is tsv, errors_file contains the following: * Column 1: ID of the request provided in the input, if it's not * provided in the input, then the input row number is used (0-based). @@ -224,7 +228,7 @@ public DestinationCase getDestinationCase() { * Error when applying the glossary. * If the input file extension is txt or html, glossary_error_file will be * generated that contains error details. glossary_error_file has format of - * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]` + * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension] * * *
.google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -262,11 +266,15 @@ public boolean hasGcsDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -281,9 +289,9 @@ public boolean hasGcsDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -293,7 +301,7 @@ public boolean hasGcsDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -334,11 +342,15 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -353,9 +365,9 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -365,7 +377,7 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -770,11 +782,15 @@ public Builder clearDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -789,9 +805,9 @@ public Builder clearDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -801,7 +817,7 @@ public Builder clearDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -839,11 +855,15 @@ public boolean hasGcsDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -858,9 +878,9 @@ public boolean hasGcsDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -870,7 +890,7 @@ public boolean hasGcsDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -918,11 +938,15 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -937,9 +961,9 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -949,7 +973,7 @@ public com.google.cloud.translate.v3beta1.GcsDestination getGcsDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -994,11 +1018,15 @@ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.GcsDestinati
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1013,9 +1041,9 @@ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.GcsDestinati
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1025,7 +1053,7 @@ public Builder setGcsDestination(com.google.cloud.translate.v3beta1.GcsDestinati
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -1068,11 +1096,15 @@ public Builder setGcsDestination(
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1087,9 +1119,9 @@ public Builder setGcsDestination(
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1099,7 +1131,7 @@ public Builder setGcsDestination(
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -1154,11 +1186,15 @@ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestina
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1173,9 +1209,9 @@ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestina
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1185,7 +1221,7 @@ public Builder mergeGcsDestination(com.google.cloud.translate.v3beta1.GcsDestina
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -1233,11 +1269,15 @@ public Builder clearGcsDestination() {
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1252,9 +1292,9 @@ public Builder clearGcsDestination() {
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1264,7 +1304,7 @@ public Builder clearGcsDestination() {
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -1299,11 +1339,15 @@ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinati
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1318,9 +1362,9 @@ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinati
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1330,7 +1374,7 @@ public com.google.cloud.translate.v3beta1.GcsDestination.Builder getGcsDestinati
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -1373,11 +1417,15 @@ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinat
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -1392,9 +1440,9 @@ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinat
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -1404,7 +1452,7 @@ public com.google.cloud.translate.v3beta1.GcsDestinationOrBuilder getGcsDestinat
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfigOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfigOrBuilder.java
index 11a887ae..a16d3321 100644
--- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfigOrBuilder.java
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/OutputConfigOrBuilder.java
@@ -50,11 +50,15 @@ public interface OutputConfigOrBuilder
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -69,9 +73,9 @@ public interface OutputConfigOrBuilder
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -81,7 +85,7 @@ public interface OutputConfigOrBuilder
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -116,11 +120,15 @@ public interface OutputConfigOrBuilder
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -135,9 +143,9 @@ public interface OutputConfigOrBuilder
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -147,7 +155,7 @@ public interface OutputConfigOrBuilder
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
@@ -182,11 +190,15 @@ public interface OutputConfigOrBuilder
* strings if the input_file is tsv. They could also be empty if we have no
* content to output.
* Once a row is present in index.csv, the input/output matching never
- * changes. Callers should also expect all the content in input_file are
+ * changes. Callers should also expect the contents in the input_file are
* processed and ready to be consumed (that is, no partial output file is
* written).
+ * Since index.csv will be updated during the process, please make
+ * sure there is no custom retention policy applied on the output bucket
+ * that may prevent file updating.
+ * (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy)
* The format of translations_file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_translations.[extension]
* If the input file extension is tsv, the output has the following
* columns:
* Column 1: ID of the request provided in the input, if it's not
@@ -201,9 +213,9 @@ public interface OutputConfigOrBuilder
* If input file extension is a txt or html, the translation is directly
* written to the output file. If glossary is requested, a separate
* glossary_translations_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
* The format of errors file (for target language code 'trg') is:
- * `gs://translation_test/a_b_c_'trg'_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_errors.[extension]
* If the input file extension is tsv, errors_file contains the following:
* Column 1: ID of the request provided in the input, if it's not
* provided in the input, then the input row number is used (0-based).
@@ -213,7 +225,7 @@ public interface OutputConfigOrBuilder
* Error when applying the glossary.
* If the input file extension is txt or html, glossary_error_file will be
* generated that contains error details. glossary_error_file has format of
- * `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`
+ * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
*
*
* .google.cloud.translation.v3beta1.GcsDestination gcs_destination = 1;
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
new file mode 100644
index 00000000..b486cd56
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentRequest.java
@@ -0,0 +1,2712 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A document translation request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.TranslateDocumentRequest} + */ +public final class TranslateDocumentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.TranslateDocumentRequest) + TranslateDocumentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslateDocumentRequest.newBuilder() to construct. + private TranslateDocumentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private TranslateDocumentRequest() { + parent_ = ""; + sourceLanguageCode_ = ""; + targetLanguageCode_ = ""; + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TranslateDocumentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslateDocumentRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceLanguageCode_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetLanguageCode_ = s; + break; + } + case 34: + { + com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder subBuilder = null; + if (documentInputConfig_ != null) { + subBuilder = documentInputConfig_.toBuilder(); + } + documentInputConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.DocumentInputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(documentInputConfig_); + documentInputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder subBuilder = null; + if (documentOutputConfig_ != null) { + subBuilder = documentOutputConfig_.toBuilder(); + } + documentOutputConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.DocumentOutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(documentOutputConfig_); + documentOutputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 58: + { + com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder subBuilder = + null; + if (glossaryConfig_ != null) { + subBuilder = glossaryConfig_.toBuilder(); + } + glossaryConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(glossaryConfig_); + glossaryConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + labels_ = + com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object sourceLanguageCode_;
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The sourceLanguageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object targetLanguageCode_;
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The targetLanguageCode.
+ */
+ @java.lang.Override
+ public java.lang.String getTargetLanguageCode() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLanguageCode_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for targetLanguageCode.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ targetLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DOCUMENT_INPUT_CONFIG_FIELD_NUMBER = 4;
+ private com.google.cloud.translate.v3beta1.DocumentInputConfig documentInputConfig_;
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the documentInputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasDocumentInputConfig() {
+ return documentInputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The documentInputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentInputConfig getDocumentInputConfig() {
+ return documentInputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentInputConfig.getDefaultInstance()
+ : documentInputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder
+ getDocumentInputConfigOrBuilder() {
+ return getDocumentInputConfig();
+ }
+
+ public static final int DOCUMENT_OUTPUT_CONFIG_FIELD_NUMBER = 5;
+ private com.google.cloud.translate.v3beta1.DocumentOutputConfig documentOutputConfig_;
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the documentOutputConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasDocumentOutputConfig() {
+ return documentOutputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The documentOutputConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfig getDocumentOutputConfig() {
+ return documentOutputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentOutputConfig.getDefaultInstance()
+ : documentOutputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder
+ getDocumentOutputConfigOrBuilder() {
+ return getDocumentOutputConfig();
+ }
+
+ public static final int MODEL_FIELD_NUMBER = 6;
+ private volatile java.lang.Object model_;
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The model.
+ */
+ @java.lang.Override
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for model.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GLOSSARY_CONFIG_FIELD_NUMBER = 7;
+ private com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig glossaryConfig_;
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasGlossaryConfig() {
+ return glossaryConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The glossaryConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig() {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder() {
+ return getGlossaryConfig();
+ }
+
+ public static final int LABELS_FIELD_NUMBER = 8;
+
+ private static final class LabelsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public boolean containsLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabels().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * A document translation request. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.TranslateDocumentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object sourceLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The sourceLanguageCode.
+ */
+ public java.lang.String getSourceLanguageCode() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
+ java.lang.Object ref = sourceLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourceLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The sourceLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSourceLanguageCode() {
+
+ sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for sourceLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sourceLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object targetLanguageCode_ = "";
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The targetLanguageCode.
+ */
+ public java.lang.String getTargetLanguageCode() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLanguageCode_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for targetLanguageCode.
+ */
+ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() {
+ java.lang.Object ref = targetLanguageCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ targetLanguageCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The targetLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetLanguageCode(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ targetLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetLanguageCode() {
+
+ targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for targetLanguageCode to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ targetLanguageCode_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.translate.v3beta1.DocumentInputConfig documentInputConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentInputConfig,
+ com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder>
+ documentInputConfigBuilder_;
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the documentInputConfig field is set.
+ */
+ public boolean hasDocumentInputConfig() {
+ return documentInputConfigBuilder_ != null || documentInputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The documentInputConfig.
+ */
+ public com.google.cloud.translate.v3beta1.DocumentInputConfig getDocumentInputConfig() {
+ if (documentInputConfigBuilder_ == null) {
+ return documentInputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentInputConfig.getDefaultInstance()
+ : documentInputConfig_;
+ } else {
+ return documentInputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setDocumentInputConfig(
+ com.google.cloud.translate.v3beta1.DocumentInputConfig value) {
+ if (documentInputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ documentInputConfig_ = value;
+ onChanged();
+ } else {
+ documentInputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder setDocumentInputConfig(
+ com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder builderForValue) {
+ if (documentInputConfigBuilder_ == null) {
+ documentInputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ documentInputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder mergeDocumentInputConfig(
+ com.google.cloud.translate.v3beta1.DocumentInputConfig value) {
+ if (documentInputConfigBuilder_ == null) {
+ if (documentInputConfig_ != null) {
+ documentInputConfig_ =
+ com.google.cloud.translate.v3beta1.DocumentInputConfig.newBuilder(
+ documentInputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ documentInputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ documentInputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public Builder clearDocumentInputConfig() {
+ if (documentInputConfigBuilder_ == null) {
+ documentInputConfig_ = null;
+ onChanged();
+ } else {
+ documentInputConfig_ = null;
+ documentInputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder
+ getDocumentInputConfigBuilder() {
+
+ onChanged();
+ return getDocumentInputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder
+ getDocumentInputConfigOrBuilder() {
+ if (documentInputConfigBuilder_ != null) {
+ return documentInputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return documentInputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentInputConfig.getDefaultInstance()
+ : documentInputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentInputConfig,
+ com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder>
+ getDocumentInputConfigFieldBuilder() {
+ if (documentInputConfigBuilder_ == null) {
+ documentInputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentInputConfig,
+ com.google.cloud.translate.v3beta1.DocumentInputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder>(
+ getDocumentInputConfig(), getParentForChildren(), isClean());
+ documentInputConfig_ = null;
+ }
+ return documentInputConfigBuilder_;
+ }
+
+ private com.google.cloud.translate.v3beta1.DocumentOutputConfig documentOutputConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder>
+ documentOutputConfigBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the documentOutputConfig field is set.
+ */
+ public boolean hasDocumentOutputConfig() {
+ return documentOutputConfigBuilder_ != null || documentOutputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The documentOutputConfig.
+ */
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfig getDocumentOutputConfig() {
+ if (documentOutputConfigBuilder_ == null) {
+ return documentOutputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentOutputConfig.getDefaultInstance()
+ : documentOutputConfig_;
+ } else {
+ return documentOutputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setDocumentOutputConfig(
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig value) {
+ if (documentOutputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ documentOutputConfig_ = value;
+ onChanged();
+ } else {
+ documentOutputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setDocumentOutputConfig(
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder builderForValue) {
+ if (documentOutputConfigBuilder_ == null) {
+ documentOutputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ documentOutputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeDocumentOutputConfig(
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig value) {
+ if (documentOutputConfigBuilder_ == null) {
+ if (documentOutputConfig_ != null) {
+ documentOutputConfig_ =
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig.newBuilder(
+ documentOutputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ documentOutputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ documentOutputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearDocumentOutputConfig() {
+ if (documentOutputConfigBuilder_ == null) {
+ documentOutputConfig_ = null;
+ onChanged();
+ } else {
+ documentOutputConfig_ = null;
+ documentOutputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder
+ getDocumentOutputConfigBuilder() {
+
+ onChanged();
+ return getDocumentOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder
+ getDocumentOutputConfigOrBuilder() {
+ if (documentOutputConfigBuilder_ != null) {
+ return documentOutputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return documentOutputConfig_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentOutputConfig.getDefaultInstance()
+ : documentOutputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder>
+ getDocumentOutputConfigFieldBuilder() {
+ if (documentOutputConfigBuilder_ == null) {
+ documentOutputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig.Builder,
+ com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder>(
+ getDocumentOutputConfig(), getParentForChildren(), isClean());
+ documentOutputConfig_ = null;
+ }
+ return documentOutputConfigBuilder_;
+ }
+
+ private java.lang.Object model_ = "";
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The model.
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for model.
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The model to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModel(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearModel() {
+
+ model_ = getDefaultInstance().getModel();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for model to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModelBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig glossaryConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>
+ glossaryConfigBuilder_;
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ public boolean hasGlossaryConfig() {
+ return glossaryConfigBuilder_ != null || glossaryConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The glossaryConfig.
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig() {
+ if (glossaryConfigBuilder_ == null) {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ } else {
+ return glossaryConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (glossaryConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ glossaryConfig_ = value;
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder builderForValue) {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (glossaryConfigBuilder_ == null) {
+ if (glossaryConfig_ != null) {
+ glossaryConfig_ =
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.newBuilder(
+ glossaryConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ glossaryConfig_ = value;
+ }
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearGlossaryConfig() {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfig_ = null;
+ onChanged();
+ } else {
+ glossaryConfig_ = null;
+ glossaryConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder
+ getGlossaryConfigBuilder() {
+
+ onChanged();
+ return getGlossaryConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder() {
+ if (glossaryConfigBuilder_ != null) {
+ return glossaryConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>
+ getGlossaryConfigFieldBuilder() {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>(
+ getGlossaryConfig(), getParentForChildren(), isClean());
+ glossaryConfig_ = null;
+ }
+ return glossaryConfigBuilder_;
+ }
+
+ private com.google.protobuf.MapField+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public boolean containsLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabels().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Override
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrDefault(
+ java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ @java.lang.Override
+ public java.lang.String getLabelsOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder removeLabels(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabels().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder putLabels(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabels().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ public Builder putAllLabels(java.util.Map+ * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * Required. Location to make a regional call. + * Format: `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. + * Non-global location is required for requests using AutoML models or custom + * glossaries. + * Models and glossaries must be within the same region (have the same + * location-id), otherwise an INVALID_ARGUMENT (400) error is returned. + *+ * + *
string parent = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The sourceLanguageCode.
+ */
+ java.lang.String getSourceLanguageCode();
+ /**
+ *
+ *
+ * + * Optional. 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. If the source language isn't specified, the API attempts + * to identify the source language automatically and returns the source + * language within the response. Source language must be specified if the + * request contains a glossary or a custom model. + *+ * + *
string source_language_code = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for sourceLanguageCode.
+ */
+ com.google.protobuf.ByteString getSourceLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The targetLanguageCode.
+ */
+ java.lang.String getTargetLanguageCode();
+ /**
+ *
+ *
+ * + * Required. The BCP-47 language code to use for translation of the input + * document, set to one of the language codes listed in Language Support. + *+ * + *
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for targetLanguageCode.
+ */
+ com.google.protobuf.ByteString getTargetLanguageCodeBytes();
+
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return Whether the documentInputConfig field is set.
+ */
+ boolean hasDocumentInputConfig();
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ *
+ * @return The documentInputConfig.
+ */
+ com.google.cloud.translate.v3beta1.DocumentInputConfig getDocumentInputConfig();
+ /**
+ *
+ *
+ * + * Required. Input configurations. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentInputConfig document_input_config = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ */
+ com.google.cloud.translate.v3beta1.DocumentInputConfigOrBuilder getDocumentInputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the documentOutputConfig field is set.
+ */
+ boolean hasDocumentOutputConfig();
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The documentOutputConfig.
+ */
+ com.google.cloud.translate.v3beta1.DocumentOutputConfig getDocumentOutputConfig();
+ /**
+ *
+ *
+ * + * Optional. Output configurations. + * Defines if the output file should be stored within Cloud Storage as well + * as the desired output format. If not provided the translated file will + * only be returned through a byte-stream and its output mime type will be + * the same as the input file's mime type. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentOutputConfig document_output_config = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.translate.v3beta1.DocumentOutputConfigOrBuilder
+ getDocumentOutputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The model.
+ */
+ java.lang.String getModel();
+ /**
+ *
+ *
+ * + * Optional. The `model` type requested for this translation. + * The format depends on model type: + * - AutoML Translation models: + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` + * - General (built-in) models: + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` + * If not provided, the default Google model (NMT) will be used for + * translation. + *+ * + *
string model = 6 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for model.
+ */
+ com.google.protobuf.ByteString getModelBytes();
+
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ boolean hasGlossaryConfig();
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The glossaryConfig.
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig();
+ /**
+ *
+ *
+ * + * Optional. Glossary to be applied. The glossary must be within the same + * region (have the same location-id) as the model, otherwise an + * INVALID_ARGUMENT (400) error is returned. + *+ * + *
+ * .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ int getLabelsCount();
+ /**
+ *
+ *
+ * + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ boolean containsLabels(java.lang.String key);
+ /** Use {@link #getLabelsMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.util.Map+ * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ * + * Optional. The labels with user-defined metadata for the request. + * Label keys and values can be no longer than 63 characters (Unicode + * codepoints), can only contain lowercase letters, numeric characters, + * underscores and dashes. International characters are allowed. Label values + * are optional. Label keys must start with a letter. + * See https://cloud.google.com/translate/docs/advanced/labels for more + * information. + *+ * + *
map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ java.lang.String getLabelsOrThrow(java.lang.String key);
+}
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
new file mode 100644
index 00000000..135971d6
--- /dev/null
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateDocumentResponse.java
@@ -0,0 +1,1595 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/translate/v3beta1/translation_service.proto
+
+package com.google.cloud.translate.v3beta1;
+
+/**
+ *
+ *
+ * + * A translated document response message. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.TranslateDocumentResponse} + */ +public final class TranslateDocumentResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.TranslateDocumentResponse) + TranslateDocumentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TranslateDocumentResponse.newBuilder() to construct. + private TranslateDocumentResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private TranslateDocumentResponse() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TranslateDocumentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TranslateDocumentResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.translate.v3beta1.DocumentTranslation.Builder subBuilder = null; + if (documentTranslation_ != null) { + subBuilder = documentTranslation_.toBuilder(); + } + documentTranslation_ = + input.readMessage( + com.google.cloud.translate.v3beta1.DocumentTranslation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(documentTranslation_); + documentTranslation_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.translate.v3beta1.DocumentTranslation.Builder subBuilder = null; + if (glossaryDocumentTranslation_ != null) { + subBuilder = glossaryDocumentTranslation_.toBuilder(); + } + glossaryDocumentTranslation_ = + input.readMessage( + com.google.cloud.translate.v3beta1.DocumentTranslation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(glossaryDocumentTranslation_); + glossaryDocumentTranslation_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + model_ = s; + break; + } + case 34: + { + com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder subBuilder = + null; + if (glossaryConfig_ != null) { + subBuilder = glossaryConfig_.toBuilder(); + } + glossaryConfig_ = + input.readMessage( + com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(glossaryConfig_); + glossaryConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.translate.v3beta1.TranslationServiceProto + .internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.translate.v3beta1.TranslateDocumentResponse.class, + com.google.cloud.translate.v3beta1.TranslateDocumentResponse.Builder.class); + } + + public static final int DOCUMENT_TRANSLATION_FIELD_NUMBER = 1; + private com.google.cloud.translate.v3beta1.DocumentTranslation documentTranslation_; + /** + * + * + *
+ * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return Whether the documentTranslation field is set.
+ */
+ @java.lang.Override
+ public boolean hasDocumentTranslation() {
+ return documentTranslation_ != null;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return The documentTranslation.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentTranslation getDocumentTranslation() {
+ return documentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : documentTranslation_;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder
+ getDocumentTranslationOrBuilder() {
+ return getDocumentTranslation();
+ }
+
+ public static final int GLOSSARY_DOCUMENT_TRANSLATION_FIELD_NUMBER = 2;
+ private com.google.cloud.translate.v3beta1.DocumentTranslation glossaryDocumentTranslation_;
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return Whether the glossaryDocumentTranslation field is set.
+ */
+ @java.lang.Override
+ public boolean hasGlossaryDocumentTranslation() {
+ return glossaryDocumentTranslation_ != null;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return The glossaryDocumentTranslation.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentTranslation getGlossaryDocumentTranslation() {
+ return glossaryDocumentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : glossaryDocumentTranslation_;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder
+ getGlossaryDocumentTranslationOrBuilder() {
+ return getGlossaryDocumentTranslation();
+ }
+
+ public static final int MODEL_FIELD_NUMBER = 3;
+ private volatile java.lang.Object model_;
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The model.
+ */
+ @java.lang.Override
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The bytes for model.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int GLOSSARY_CONFIG_FIELD_NUMBER = 4;
+ private com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig glossaryConfig_;
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ @java.lang.Override
+ public boolean hasGlossaryConfig() {
+ return glossaryConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ * @return The glossaryConfig.
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig() {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ */
+ @java.lang.Override
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder() {
+ return getGlossaryConfig();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (documentTranslation_ != null) {
+ output.writeMessage(1, getDocumentTranslation());
+ }
+ if (glossaryDocumentTranslation_ != null) {
+ output.writeMessage(2, getGlossaryDocumentTranslation());
+ }
+ if (!getModelBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, model_);
+ }
+ if (glossaryConfig_ != null) {
+ output.writeMessage(4, getGlossaryConfig());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (documentTranslation_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocumentTranslation());
+ }
+ if (glossaryDocumentTranslation_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, getGlossaryDocumentTranslation());
+ }
+ if (!getModelBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, model_);
+ }
+ if (glossaryConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGlossaryConfig());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.translate.v3beta1.TranslateDocumentResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.translate.v3beta1.TranslateDocumentResponse other =
+ (com.google.cloud.translate.v3beta1.TranslateDocumentResponse) obj;
+
+ if (hasDocumentTranslation() != other.hasDocumentTranslation()) return false;
+ if (hasDocumentTranslation()) {
+ if (!getDocumentTranslation().equals(other.getDocumentTranslation())) return false;
+ }
+ if (hasGlossaryDocumentTranslation() != other.hasGlossaryDocumentTranslation()) return false;
+ if (hasGlossaryDocumentTranslation()) {
+ if (!getGlossaryDocumentTranslation().equals(other.getGlossaryDocumentTranslation()))
+ return false;
+ }
+ if (!getModel().equals(other.getModel())) return false;
+ if (hasGlossaryConfig() != other.hasGlossaryConfig()) return false;
+ if (hasGlossaryConfig()) {
+ if (!getGlossaryConfig().equals(other.getGlossaryConfig())) return false;
+ }
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasDocumentTranslation()) {
+ hash = (37 * hash) + DOCUMENT_TRANSLATION_FIELD_NUMBER;
+ hash = (53 * hash) + getDocumentTranslation().hashCode();
+ }
+ if (hasGlossaryDocumentTranslation()) {
+ hash = (37 * hash) + GLOSSARY_DOCUMENT_TRANSLATION_FIELD_NUMBER;
+ hash = (53 * hash) + getGlossaryDocumentTranslation().hashCode();
+ }
+ hash = (37 * hash) + MODEL_FIELD_NUMBER;
+ hash = (53 * hash) + getModel().hashCode();
+ if (hasGlossaryConfig()) {
+ hash = (37 * hash) + GLOSSARY_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getGlossaryConfig().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.translate.v3beta1.TranslateDocumentResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A translated document response message. + *+ * + * Protobuf type {@code google.cloud.translation.v3beta1.TranslateDocumentResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return Whether the documentTranslation field is set.
+ */
+ public boolean hasDocumentTranslation() {
+ return documentTranslationBuilder_ != null || documentTranslation_ != null;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return The documentTranslation.
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslation getDocumentTranslation() {
+ if (documentTranslationBuilder_ == null) {
+ return documentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : documentTranslation_;
+ } else {
+ return documentTranslationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public Builder setDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation value) {
+ if (documentTranslationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ documentTranslation_ = value;
+ onChanged();
+ } else {
+ documentTranslationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public Builder setDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder builderForValue) {
+ if (documentTranslationBuilder_ == null) {
+ documentTranslation_ = builderForValue.build();
+ onChanged();
+ } else {
+ documentTranslationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public Builder mergeDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation value) {
+ if (documentTranslationBuilder_ == null) {
+ if (documentTranslation_ != null) {
+ documentTranslation_ =
+ com.google.cloud.translate.v3beta1.DocumentTranslation.newBuilder(
+ documentTranslation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ documentTranslation_ = value;
+ }
+ onChanged();
+ } else {
+ documentTranslationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public Builder clearDocumentTranslation() {
+ if (documentTranslationBuilder_ == null) {
+ documentTranslation_ = null;
+ onChanged();
+ } else {
+ documentTranslation_ = null;
+ documentTranslationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslation.Builder
+ getDocumentTranslationBuilder() {
+
+ onChanged();
+ return getDocumentTranslationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder
+ getDocumentTranslationOrBuilder() {
+ if (documentTranslationBuilder_ != null) {
+ return documentTranslationBuilder_.getMessageOrBuilder();
+ } else {
+ return documentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : documentTranslation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentTranslation,
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder,
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder>
+ getDocumentTranslationFieldBuilder() {
+ if (documentTranslationBuilder_ == null) {
+ documentTranslationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentTranslation,
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder,
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder>(
+ getDocumentTranslation(), getParentForChildren(), isClean());
+ documentTranslation_ = null;
+ }
+ return documentTranslationBuilder_;
+ }
+
+ private com.google.cloud.translate.v3beta1.DocumentTranslation glossaryDocumentTranslation_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentTranslation,
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder,
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder>
+ glossaryDocumentTranslationBuilder_;
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return Whether the glossaryDocumentTranslation field is set.
+ */
+ public boolean hasGlossaryDocumentTranslation() {
+ return glossaryDocumentTranslationBuilder_ != null || glossaryDocumentTranslation_ != null;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return The glossaryDocumentTranslation.
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslation getGlossaryDocumentTranslation() {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ return glossaryDocumentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : glossaryDocumentTranslation_;
+ } else {
+ return glossaryDocumentTranslationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public Builder setGlossaryDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation value) {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ glossaryDocumentTranslation_ = value;
+ onChanged();
+ } else {
+ glossaryDocumentTranslationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public Builder setGlossaryDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder builderForValue) {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ glossaryDocumentTranslation_ = builderForValue.build();
+ onChanged();
+ } else {
+ glossaryDocumentTranslationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public Builder mergeGlossaryDocumentTranslation(
+ com.google.cloud.translate.v3beta1.DocumentTranslation value) {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ if (glossaryDocumentTranslation_ != null) {
+ glossaryDocumentTranslation_ =
+ com.google.cloud.translate.v3beta1.DocumentTranslation.newBuilder(
+ glossaryDocumentTranslation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ glossaryDocumentTranslation_ = value;
+ }
+ onChanged();
+ } else {
+ glossaryDocumentTranslationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public Builder clearGlossaryDocumentTranslation() {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ glossaryDocumentTranslation_ = null;
+ onChanged();
+ } else {
+ glossaryDocumentTranslation_ = null;
+ glossaryDocumentTranslationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslation.Builder
+ getGlossaryDocumentTranslationBuilder() {
+
+ onChanged();
+ return getGlossaryDocumentTranslationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder
+ getGlossaryDocumentTranslationOrBuilder() {
+ if (glossaryDocumentTranslationBuilder_ != null) {
+ return glossaryDocumentTranslationBuilder_.getMessageOrBuilder();
+ } else {
+ return glossaryDocumentTranslation_ == null
+ ? com.google.cloud.translate.v3beta1.DocumentTranslation.getDefaultInstance()
+ : glossaryDocumentTranslation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
+ * .google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentTranslation,
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder,
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder>
+ getGlossaryDocumentTranslationFieldBuilder() {
+ if (glossaryDocumentTranslationBuilder_ == null) {
+ glossaryDocumentTranslationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.DocumentTranslation,
+ com.google.cloud.translate.v3beta1.DocumentTranslation.Builder,
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder>(
+ getGlossaryDocumentTranslation(), getParentForChildren(), isClean());
+ glossaryDocumentTranslation_ = null;
+ }
+ return glossaryDocumentTranslationBuilder_;
+ }
+
+ private java.lang.Object model_ = "";
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The model.
+ */
+ public java.lang.String getModel() {
+ java.lang.Object ref = model_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ model_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The bytes for model.
+ */
+ public com.google.protobuf.ByteString getModelBytes() {
+ java.lang.Object ref = model_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ model_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @param value The model to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModel(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearModel() {
+
+ model_ = getDefaultInstance().getModel();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @param value The bytes for model to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModelBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ model_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig glossaryConfig_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>
+ glossaryConfigBuilder_;
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ public boolean hasGlossaryConfig() {
+ return glossaryConfigBuilder_ != null || glossaryConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ *
+ * @return The glossaryConfig.
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig() {
+ if (glossaryConfigBuilder_ == null) {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ } else {
+ return glossaryConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public Builder setGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (glossaryConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ glossaryConfig_ = value;
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public Builder setGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder builderForValue) {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public Builder mergeGlossaryConfig(
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig value) {
+ if (glossaryConfigBuilder_ == null) {
+ if (glossaryConfig_ != null) {
+ glossaryConfig_ =
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.newBuilder(
+ glossaryConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ glossaryConfig_ = value;
+ }
+ onChanged();
+ } else {
+ glossaryConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public Builder clearGlossaryConfig() {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfig_ = null;
+ onChanged();
+ } else {
+ glossaryConfig_ = null;
+ glossaryConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder
+ getGlossaryConfigBuilder() {
+
+ onChanged();
+ return getGlossaryConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder() {
+ if (glossaryConfigBuilder_ != null) {
+ return glossaryConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return glossaryConfig_ == null
+ ? com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.getDefaultInstance()
+ : glossaryConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>
+ getGlossaryConfigFieldBuilder() {
+ if (glossaryConfigBuilder_ == null) {
+ glossaryConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder,
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder>(
+ getGlossaryConfig(), getParentForChildren(), isClean());
+ glossaryConfig_ = null;
+ }
+ return glossaryConfigBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3beta1.TranslateDocumentResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateDocumentResponse)
+ private static final com.google.cloud.translate.v3beta1.TranslateDocumentResponse
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.TranslateDocumentResponse();
+ }
+
+ public static com.google.cloud.translate.v3beta1.TranslateDocumentResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return Whether the documentTranslation field is set.
+ */
+ boolean hasDocumentTranslation();
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ *
+ * @return The documentTranslation.
+ */
+ com.google.cloud.translate.v3beta1.DocumentTranslation getDocumentTranslation();
+ /**
+ *
+ *
+ * + * Translated document. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation document_translation = 1;
+ */
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder getDocumentTranslationOrBuilder();
+
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return Whether the glossaryDocumentTranslation field is set.
+ */
+ boolean hasGlossaryDocumentTranslation();
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ *
+ * @return The glossaryDocumentTranslation.
+ */
+ com.google.cloud.translate.v3beta1.DocumentTranslation getGlossaryDocumentTranslation();
+ /**
+ *
+ *
+ * + * The document's translation output if a glossary is provided in the request. + * This can be the same as [TranslateDocumentResponse.document_translation] + * if no glossary terms apply. + *+ * + *
.google.cloud.translation.v3beta1.DocumentTranslation glossary_document_translation = 2;
+ *
+ */
+ com.google.cloud.translate.v3beta1.DocumentTranslationOrBuilder
+ getGlossaryDocumentTranslationOrBuilder();
+
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The model.
+ */
+ java.lang.String getModel();
+ /**
+ *
+ *
+ * + * Only present when 'model' is present in the request. + * 'model' is normalized to have a project number. + * For example: + * If the 'model' field in TranslateDocumentRequest is: + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. + *+ * + *
string model = 3;
+ *
+ * @return The bytes for model.
+ */
+ com.google.protobuf.ByteString getModelBytes();
+
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ * @return Whether the glossaryConfig field is set.
+ */
+ boolean hasGlossaryConfig();
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ *
+ * @return The glossaryConfig.
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossaryConfig();
+ /**
+ *
+ *
+ * + * The `glossary_config` used for this translation. + *+ * + *
.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig glossary_config = 4;
+ */
+ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder
+ getGlossaryConfigOrBuilder();
+}
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 94427f60..8b021caa 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
@@ -207,7 +207,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) {
*
* * Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -223,7 +224,8 @@ public com.google.protobuf.ProtocolStringList getContentsList() { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -239,7 +241,8 @@ public int getContentsCount() { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -256,7 +259,8 @@ public java.lang.String getContents(int index) { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -436,10 +440,10 @@ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -470,10 +474,10 @@ public java.lang.String getParent() { ** @@ -1249,7 +1253,8 @@ private void ensureContentsIsMutable() { * ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -508,13 +512,13 @@ public com.google.protobuf.ByteString getParentBytes() { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** @@ -541,13 +545,13 @@ public java.lang.String getModel() { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1265,7 +1270,8 @@ public com.google.protobuf.ProtocolStringList getContentsList() { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1281,7 +1287,8 @@ public int getContentsCount() { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1298,7 +1305,8 @@ public java.lang.String getContents(int index) { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1315,7 +1323,8 @@ public com.google.protobuf.ByteString getContentsBytes(int index) { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1339,7 +1348,8 @@ public Builder setContents(int index, java.lang.String value) { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1362,7 +1372,8 @@ public Builder addContents(java.lang.String value) { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1382,7 +1393,8 @@ public Builder addAllContents(java.lang.Iterable
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1401,7 +1413,8 @@ public Builder clearContents() { * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -1776,10 +1789,10 @@ public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -1809,10 +1822,10 @@ public java.lang.String getParent() { ** diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequestOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequestOrBuilder.java index 6ebeda6a..9468a66d 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequestOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequestOrBuilder.java @@ -28,7 +28,8 @@ public interface TranslateTextRequestOrBuilder * ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -1842,10 +1855,10 @@ public com.google.protobuf.ByteString getParentBytes() { ** @@ -2060,13 +2073,13 @@ public Builder clearModel() { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -1874,10 +1887,10 @@ public Builder setParent(java.lang.String value) { ** @@ -2033,13 +2046,13 @@ public Builder setModel(java.lang.String value) { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -1902,10 +1915,10 @@ public Builder clearParent() { ** @@ -2002,13 +2015,13 @@ public com.google.protobuf.ByteString getModelBytes() { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -1938,13 +1951,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** @@ -1970,13 +1983,13 @@ public java.lang.String getModel() { * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -42,7 +43,8 @@ public interface TranslateTextRequestOrBuilder * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -56,7 +58,8 @@ public interface TranslateTextRequestOrBuilder * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -71,7 +74,8 @@ public interface TranslateTextRequestOrBuilder * *
* Required. The content of the input in string format. - * We recommend the total content be less than 30k codepoints. + * We recommend the total content be less than 30k codepoints. The max length + * of this field is 1024. * Use BatchTranslateText for larger text. ** @@ -175,10 +179,10 @@ public interface TranslateTextRequestOrBuilder *
* Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -198,10 +202,10 @@ public interface TranslateTextRequestOrBuilder ** diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponse.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponse.java index e89bdb3f..b29a7191 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponse.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponse.java @@ -216,8 +216,8 @@ public com.google.cloud.translate.v3beta1.TranslationOrBuilder getTranslationsOr ** Required. Project or location to make a call. Must refer to a caller's * project. - * Format: `projects/{project-id}` or - * `projects/{project-id}/locations/{location-id}`. - * For global calls, use `projects/{project-id}/locations/global` or - * `projects/{project-id}`. + * Format: `projects/{project-number-or-id}` or + * `projects/{project-number-or-id}/locations/{location-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global` or + * `projects/{project-number-or-id}`. * Non-global location is required for requests using AutoML models or * custom glossaries. * Models and glossaries must be within the same region (have same @@ -223,13 +227,13 @@ public interface TranslateTextRequestOrBuilder * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. ** @@ -245,13 +249,13 @@ public interface TranslateTextRequestOrBuilder * Optional. The `model` type requested for this translation. * The format depends on model type: * - AutoML Translation models: - * `projects/{project-id}/locations/{location-id}/models/{model-id}` + * `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` * - General (built-in) models: - * `projects/{project-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-id}/locations/{location-id}/models/general/base` + * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, + * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * For global (non-regionalized) requests, use `location-id` `global`. * For example, - * `projects/{project-id}/locations/global/models/general/nmt`. + * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * If missing, the system decides which google base model to use. *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -234,8 +234,8 @@ public com.google.cloud.translate.v3beta1.TranslationOrBuilder getTranslationsOr *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -252,8 +252,8 @@ public com.google.cloud.translate.v3beta1.TranslationOrBuilder getTranslationsOr *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -269,8 +269,8 @@ public int getGlossaryTranslationsCount() { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -286,8 +286,8 @@ public com.google.cloud.translate.v3beta1.Translation getGlossaryTranslations(in *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1123,8 +1123,8 @@ private void ensureGlossaryTranslationsIsMutable() { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1145,8 +1145,8 @@ private void ensureGlossaryTranslationsIsMutable() { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1166,8 +1166,8 @@ public int getGlossaryTranslationsCount() { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1187,8 +1187,8 @@ public com.google.cloud.translate.v3beta1.Translation getGlossaryTranslations(in *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1215,8 +1215,8 @@ public Builder setGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1240,8 +1240,8 @@ public Builder setGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1267,8 +1267,8 @@ public Builder addGlossaryTranslations(com.google.cloud.translate.v3beta1.Transl *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1295,8 +1295,8 @@ public Builder addGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1320,8 +1320,8 @@ public Builder addGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1345,8 +1345,8 @@ public Builder addGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1370,8 +1370,8 @@ public Builder addAllGlossaryTranslations( *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1394,8 +1394,8 @@ public Builder clearGlossaryTranslations() { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1418,8 +1418,8 @@ public Builder removeGlossaryTranslations(int index) { *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1436,8 +1436,8 @@ public com.google.cloud.translate.v3beta1.Translation.Builder getGlossaryTransla *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1458,8 +1458,8 @@ public com.google.cloud.translate.v3beta1.TranslationOrBuilder getGlossaryTransl *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1480,8 +1480,8 @@ public com.google.cloud.translate.v3beta1.TranslationOrBuilder getGlossaryTransl *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1498,8 +1498,8 @@ public com.google.cloud.translate.v3beta1.Translation.Builder addGlossaryTransla *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -1517,8 +1517,8 @@ public com.google.cloud.translate.v3beta1.Translation.Builder addGlossaryTransla *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponseOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponseOrBuilder.java index ef4079c3..bab76d8f 100644 --- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponseOrBuilder.java +++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextResponseOrBuilder.java @@ -91,8 +91,8 @@ public interface TranslateTextResponseOrBuilder *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -105,8 +105,8 @@ public interface TranslateTextResponseOrBuilder *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -119,8 +119,8 @@ public interface TranslateTextResponseOrBuilder *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -133,8 +133,8 @@ public interface TranslateTextResponseOrBuilder *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** @@ -148,8 +148,8 @@ public interface TranslateTextResponseOrBuilder *
* Text translation responses if a glossary is provided in the request. * This can be the same as - * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply. - * This field has the same length as + * [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] + * if no terms apply. This field has the same length as * [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. ** 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 a096b586..9183b864 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 @@ -201,7 +201,12 @@ public com.google.protobuf.ByteString getTranslatedTextBytes() { * *
* Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -225,7 +230,12 @@ public java.lang.String getModel() {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -837,7 +847,12 @@ public Builder setTranslatedTextBytes(com.google.protobuf.ByteString value) {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -860,7 +875,12 @@ public java.lang.String getModel() {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -883,7 +903,12 @@ public com.google.protobuf.ByteString getModelBytes() {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -905,7 +930,12 @@ public Builder setModel(java.lang.String value) {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -923,7 +953,12 @@ public Builder clearModel() {
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
diff --git a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationOrBuilder.java b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationOrBuilder.java
index 68077b43..b0cb015f 100644
--- a/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationOrBuilder.java
+++ b/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslationOrBuilder.java
@@ -53,7 +53,12 @@ public interface TranslationOrBuilder
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
@@ -66,7 +71,12 @@ public interface TranslationOrBuilder
*
* * Only present when `model` is present in the request. - * This is same as `model` provided in the request. + * `model` here is normalized to have project number. + * For example: + * If the `model` requested in TranslationTextRequest is + * `projects/{project-id}/locations/{location-id}/models/general/nmt` then + * `model` here would be normalized to + * `projects/{project-number}/locations/{location-id}/models/general/nmt`. ** *
string model = 2;
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 54c6704a..28882674 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
@@ -91,6 +91,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_translation_v3beta1_OutputConfig_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_translation_v3beta1_OutputConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_LabelsEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_LabelsEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_DocumentTranslation_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_DocumentTranslation_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -163,6 +187,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_ModelsEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_ModelsEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_GlossariesEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_GlossariesEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -200,178 +252,265 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "translated_text\030\001 \001(\t\022\r\n\005model\030\002 \001(\t\022\036\n\026"
+ "detected_language_code\030\004 \001(\t\022V\n\017glossary"
+ "_config\030\003 \001(\0132=.google.cloud.translation"
- + ".v3beta1.TranslateTextGlossaryConfig\"\237\002\n"
+ + ".v3beta1.TranslateTextGlossaryConfig\"\244\002\n"
+ "\025DetectLanguageRequest\0229\n\006parent\030\005 \001(\tB)"
+ "\340A\002\372A#\n!locations.googleapis.com/Locatio"
+ "n\022\022\n\005model\030\004 \001(\tB\003\340A\001\022\021\n\007content\030\001 \001(\tH\000"
- + "\022\026\n\tmime_type\030\003 \001(\tB\003\340A\001\022S\n\006labels\030\006 \003(\013"
+ + "\022\026\n\tmime_type\030\003 \001(\tB\003\340A\001\022X\n\006labels\030\006 \003(\013"
+ "2C.google.cloud.translation.v3beta1.Dete"
- + "ctLanguageRequest.LabelsEntry\032-\n\013LabelsE"
- + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\010\n\006"
- + "source\"=\n\020DetectedLanguage\022\025\n\rlanguage_c"
- + "ode\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\"_\n\026DetectL"
- + "anguageResponse\022E\n\tlanguages\030\001 \003(\01322.goo"
- + "gle.cloud.translation.v3beta1.DetectedLa"
- + "nguage\"\221\001\n\034GetSupportedLanguagesRequest\022"
- + "9\n\006parent\030\003 \001(\tB)\340A\002\372A#\n!locations.googl"
- + "eapis.com/Location\022\"\n\025display_language_c"
- + "ode\030\001 \001(\tB\003\340A\001\022\022\n\005model\030\002 \001(\tB\003\340A\001\"\\\n\022Su"
- + "pportedLanguages\022F\n\tlanguages\030\001 \003(\01323.go"
- + "ogle.cloud.translation.v3beta1.Supported"
- + "Language\"p\n\021SupportedLanguage\022\025\n\rlanguag"
- + "e_code\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\026\n\016su"
- + "pport_source\030\003 \001(\010\022\026\n\016support_target\030\004 \001"
- + "(\010\"#\n\tGcsSource\022\026\n\tinput_uri\030\001 \001(\tB\003\340A\002\""
- + "r\n\013InputConfig\022\026\n\tmime_type\030\001 \001(\tB\003\340A\001\022A"
- + "\n\ngcs_source\030\002 \001(\0132+.google.cloud.transl"
- + "ation.v3beta1.GcsSourceH\000B\010\n\006source\"0\n\016G"
- + "csDestination\022\036\n\021output_uri_prefix\030\001 \001(\t"
- + "B\003\340A\002\"j\n\014OutputConfig\022K\n\017gcs_destination"
- + "\030\001 \001(\01320.google.cloud.translation.v3beta"
- + "1.GcsDestinationH\000B\r\n\013destination\"\246\006\n\031Ba"
- + "tchTranslateTextRequest\0229\n\006parent\030\001 \001(\tB"
- + ")\340A\002\372A#\n!locations.googleapis.com/Locati"
- + "on\022!\n\024source_language_code\030\002 \001(\tB\003\340A\002\022\"\n"
- + "\025target_language_codes\030\003 \003(\tB\003\340A\002\022\\\n\006mod"
- + "els\030\004 \003(\0132G.google.cloud.translation.v3b"
- + "eta1.BatchTranslateTextRequest.ModelsEnt"
- + "ryB\003\340A\001\022I\n\rinput_configs\030\005 \003(\0132-.google."
- + "cloud.translation.v3beta1.InputConfigB\003\340"
- + "A\002\022J\n\routput_config\030\006 \001(\0132..google.cloud"
- + ".translation.v3beta1.OutputConfigB\003\340A\002\022d"
- + "\n\nglossaries\030\007 \003(\0132K.google.cloud.transl"
+ + "ctLanguageRequest.LabelsEntryB\003\340A\001\032-\n\013La"
+ + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
+ + "\001B\010\n\006source\"=\n\020DetectedLanguage\022\025\n\rlangu"
+ + "age_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\002\"_\n\026De"
+ + "tectLanguageResponse\022E\n\tlanguages\030\001 \003(\0132"
+ + "2.google.cloud.translation.v3beta1.Detec"
+ + "tedLanguage\"\221\001\n\034GetSupportedLanguagesReq"
+ + "uest\0229\n\006parent\030\003 \001(\tB)\340A\002\372A#\n!locations."
+ + "googleapis.com/Location\022\"\n\025display_langu"
+ + "age_code\030\001 \001(\tB\003\340A\001\022\022\n\005model\030\002 \001(\tB\003\340A\001\""
+ + "\\\n\022SupportedLanguages\022F\n\tlanguages\030\001 \003(\013"
+ + "23.google.cloud.translation.v3beta1.Supp"
+ + "ortedLanguage\"p\n\021SupportedLanguage\022\025\n\rla"
+ + "nguage_code\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022"
+ + "\026\n\016support_source\030\003 \001(\010\022\026\n\016support_targe"
+ + "t\030\004 \001(\010\"#\n\tGcsSource\022\026\n\tinput_uri\030\001 \001(\tB"
+ + "\003\340A\002\"r\n\013InputConfig\022\026\n\tmime_type\030\001 \001(\tB\003"
+ + "\340A\001\022A\n\ngcs_source\030\002 \001(\0132+.google.cloud.t"
+ + "ranslation.v3beta1.GcsSourceH\000B\010\n\006source"
+ + "\"0\n\016GcsDestination\022\036\n\021output_uri_prefix\030"
+ + "\001 \001(\tB\003\340A\002\"j\n\014OutputConfig\022K\n\017gcs_destin"
+ + "ation\030\001 \001(\01320.google.cloud.translation.v"
+ + "3beta1.GcsDestinationH\000B\r\n\013destination\"\210"
+ + "\001\n\023DocumentInputConfig\022\021\n\007content\030\001 \001(\014H"
+ + "\000\022A\n\ngcs_source\030\002 \001(\0132+.google.cloud.tra"
+ + "nslation.v3beta1.GcsSourceH\000\022\021\n\tmime_typ"
+ + "e\030\004 \001(\tB\010\n\006source\"\217\001\n\024DocumentOutputConf"
+ + "ig\022P\n\017gcs_destination\030\001 \001(\01320.google.clo"
+ + "ud.translation.v3beta1.GcsDestinationB\003\340"
+ + "A\001H\000\022\026\n\tmime_type\030\003 \001(\tB\003\340A\001B\r\n\013destinat"
+ + "ion\"\252\004\n\030TranslateDocumentRequest\022\023\n\006pare"
+ + "nt\030\001 \001(\tB\003\340A\002\022!\n\024source_language_code\030\002 "
+ + "\001(\tB\003\340A\001\022!\n\024target_language_code\030\003 \001(\tB\003"
+ + "\340A\002\022Y\n\025document_input_config\030\004 \001(\01325.goo"
+ + "gle.cloud.translation.v3beta1.DocumentIn"
+ + "putConfigB\003\340A\002\022[\n\026document_output_config"
+ + "\030\005 \001(\01326.google.cloud.translation.v3beta"
+ + "1.DocumentOutputConfigB\003\340A\001\022\022\n\005model\030\006 \001"
+ + "(\tB\003\340A\001\022[\n\017glossary_config\030\007 \001(\0132=.googl"
+ + "e.cloud.translation.v3beta1.TranslateTex"
+ + "tGlossaryConfigB\003\340A\001\022[\n\006labels\030\010 \003(\0132F.g"
+ + "oogle.cloud.translation.v3beta1.Translat"
+ + "eDocumentRequest.LabelsEntryB\003\340A\001\032-\n\013Lab"
+ + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001"
+ + "\"e\n\023DocumentTranslation\022\033\n\023byte_stream_o"
+ + "utputs\030\001 \003(\014\022\021\n\tmime_type\030\002 \001(\t\022\036\n\026detec"
+ + "ted_language_code\030\003 \001(\t\"\265\002\n\031TranslateDoc"
+ + "umentResponse\022S\n\024document_translation\030\001 "
+ + "\001(\01325.google.cloud.translation.v3beta1.D"
+ + "ocumentTranslation\022\\\n\035glossary_document_"
+ + "translation\030\002 \001(\01325.google.cloud.transla"
+ + "tion.v3beta1.DocumentTranslation\022\r\n\005mode"
+ + "l\030\003 \001(\t\022V\n\017glossary_config\030\004 \001(\0132=.googl"
+ + "e.cloud.translation.v3beta1.TranslateTex"
+ + "tGlossaryConfig\"\246\006\n\031BatchTranslateTextRe"
+ + "quest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations"
+ + ".googleapis.com/Location\022!\n\024source_langu"
+ + "age_code\030\002 \001(\tB\003\340A\002\022\"\n\025target_language_c"
+ + "odes\030\003 \003(\tB\003\340A\002\022\\\n\006models\030\004 \003(\0132G.google"
+ + ".cloud.translation.v3beta1.BatchTranslat"
+ + "eTextRequest.ModelsEntryB\003\340A\001\022I\n\rinput_c"
+ + "onfigs\030\005 \003(\0132-.google.cloud.translation."
+ + "v3beta1.InputConfigB\003\340A\002\022J\n\routput_confi"
+ + "g\030\006 \001(\0132..google.cloud.translation.v3bet"
+ + "a1.OutputConfigB\003\340A\002\022d\n\nglossaries\030\007 \003(\013"
+ + "2K.google.cloud.translation.v3beta1.Batc"
+ + "hTranslateTextRequest.GlossariesEntryB\003\340"
+ + "A\001\022\\\n\006labels\030\t \003(\0132G.google.cloud.transl"
+ "ation.v3beta1.BatchTranslateTextRequest."
- + "GlossariesEntryB\003\340A\001\022\\\n\006labels\030\t \003(\0132G.g"
- + "oogle.cloud.translation.v3beta1.BatchTra"
- + "nslateTextRequest.LabelsEntryB\003\340A\001\032-\n\013Mo"
- + "delsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
- + "\001\032p\n\017GlossariesEntry\022\013\n\003key\030\001 \001(\t\022L\n\005val"
- + "ue\030\002 \001(\0132=.google.cloud.translation.v3be"
- + "ta1.TranslateTextGlossaryConfig:\0028\001\032-\n\013L"
- + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002"
- + "8\001\"\323\002\n\026BatchTranslateMetadata\022M\n\005state\030\001"
- + " \001(\0162>.google.cloud.translation.v3beta1."
- + "BatchTranslateMetadata.State\022\035\n\025translat"
- + "ed_characters\030\002 \001(\003\022\031\n\021failed_characters"
- + "\030\003 \001(\003\022\030\n\020total_characters\030\004 \001(\003\022/\n\013subm"
- + "it_time\030\005 \001(\0132\032.google.protobuf.Timestam"
+ + "LabelsEntryB\003\340A\001\032-\n\013ModelsEntry\022\013\n\003key\030\001"
+ + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032p\n\017GlossariesEnt"
+ + "ry\022\013\n\003key\030\001 \001(\t\022L\n\005value\030\002 \001(\0132=.google."
+ + "cloud.translation.v3beta1.TranslateTextG"
+ + "lossaryConfig:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030"
+ + "\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\323\002\n\026BatchTransl"
+ + "ateMetadata\022M\n\005state\030\001 \001(\0162>.google.clou"
+ + "d.translation.v3beta1.BatchTranslateMeta"
+ + "data.State\022\035\n\025translated_characters\030\002 \001("
+ + "\003\022\031\n\021failed_characters\030\003 \001(\003\022\030\n\020total_ch"
+ + "aracters\030\004 \001(\003\022/\n\013submit_time\030\005 \001(\0132\032.go"
+ + "ogle.protobuf.Timestamp\"e\n\005State\022\025\n\021STAT"
+ + "E_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDE"
+ + "D\020\002\022\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCE"
+ + "LLED\020\005\"\313\001\n\026BatchTranslateResponse\022\030\n\020tot"
+ + "al_characters\030\001 \001(\003\022\035\n\025translated_charac"
+ + "ters\030\002 \001(\003\022\031\n\021failed_characters\030\003 \001(\003\022/\n"
+ + "\013submit_time\030\004 \001(\0132\032.google.protobuf.Tim"
+ + "estamp\022,\n\010end_time\030\005 \001(\0132\032.google.protob"
+ + "uf.Timestamp\"b\n\023GlossaryInputConfig\022A\n\ng"
+ + "cs_source\030\001 \001(\0132+.google.cloud.translati"
+ + "on.v3beta1.GcsSourceH\000B\010\n\006source\"\216\005\n\010Glo"
+ + "ssary\022\021\n\004name\030\001 \001(\tB\003\340A\002\022T\n\rlanguage_pai"
+ + "r\030\003 \001(\0132;.google.cloud.translation.v3bet"
+ + "a1.Glossary.LanguageCodePairH\000\022Y\n\022langua"
+ + "ge_codes_set\030\004 \001(\0132;.google.cloud.transl"
+ + "ation.v3beta1.Glossary.LanguageCodesSetH"
+ + "\000\022K\n\014input_config\030\005 \001(\01325.google.cloud.t"
+ + "ranslation.v3beta1.GlossaryInputConfig\022\030"
+ + "\n\013entry_count\030\006 \001(\005B\003\340A\003\0224\n\013submit_time\030"
+ + "\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221"
+ + "\n\010end_time\030\010 \001(\0132\032.google.protobuf.Times"
+ + "tampB\003\340A\003\032N\n\020LanguageCodePair\022\034\n\024source_"
+ + "language_code\030\001 \001(\t\022\034\n\024target_language_c"
+ + "ode\030\002 \001(\t\032*\n\020LanguageCodesSet\022\026\n\016languag"
+ + "e_codes\030\001 \003(\t:e\352Ab\n!translate.googleapis"
+ + ".com/Glossary\022=projects/{project}/locati"
+ + "ons/{location}/glossaries/{glossary}B\013\n\t"
+ + "languages\"\225\001\n\025CreateGlossaryRequest\0229\n\006p"
+ + "arent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapi"
+ + "s.com/Location\022A\n\010glossary\030\002 \001(\0132*.googl"
+ + "e.cloud.translation.v3beta1.GlossaryB\003\340A"
+ + "\002\"M\n\022GetGlossaryRequest\0227\n\004name\030\001 \001(\tB)\340"
+ + "A\002\372A#\n!translate.googleapis.com/Glossary"
+ + "\"P\n\025DeleteGlossaryRequest\0227\n\004name\030\001 \001(\tB"
+ + ")\340A\002\372A#\n!translate.googleapis.com/Glossa"
+ + "ry\"\230\001\n\025ListGlossariesRequest\0229\n\006parent\030\001"
+ + " \001(\tB)\340A\002\372A#\n!locations.googleapis.com/L"
+ + "ocation\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_"
+ + "token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\"q\n"
+ + "\026ListGlossariesResponse\022>\n\nglossaries\030\001 "
+ + "\003(\0132*.google.cloud.translation.v3beta1.G"
+ + "lossary\022\027\n\017next_page_token\030\002 \001(\t\"\215\002\n\026Cre"
+ + "ateGlossaryMetadata\022\014\n\004name\030\001 \001(\t\022M\n\005sta"
+ + "te\030\002 \001(\0162>.google.cloud.translation.v3be"
+ + "ta1.CreateGlossaryMetadata.State\022/\n\013subm"
+ + "it_time\030\003 \001(\0132\032.google.protobuf.Timestam"
+ "p\"e\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUN"
+ "NING\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\016\n\nCAN"
- + "CELLING\020\004\022\r\n\tCANCELLED\020\005\"\313\001\n\026BatchTransl"
- + "ateResponse\022\030\n\020total_characters\030\001 \001(\003\022\035\n"
- + "\025translated_characters\030\002 \001(\003\022\031\n\021failed_c"
- + "haracters\030\003 \001(\003\022/\n\013submit_time\030\004 \001(\0132\032.g"
- + "oogle.protobuf.Timestamp\022,\n\010end_time\030\005 \001"
- + "(\0132\032.google.protobuf.Timestamp\"b\n\023Glossa"
- + "ryInputConfig\022A\n\ngcs_source\030\001 \001(\0132+.goog"
- + "le.cloud.translation.v3beta1.GcsSourceH\000"
- + "B\010\n\006source\"\216\005\n\010Glossary\022\021\n\004name\030\001 \001(\tB\003\340"
- + "A\002\022T\n\rlanguage_pair\030\003 \001(\0132;.google.cloud"
- + ".translation.v3beta1.Glossary.LanguageCo"
- + "dePairH\000\022Y\n\022language_codes_set\030\004 \001(\0132;.g"
- + "oogle.cloud.translation.v3beta1.Glossary"
- + ".LanguageCodesSetH\000\022K\n\014input_config\030\005 \001("
- + "\01325.google.cloud.translation.v3beta1.Glo"
- + "ssaryInputConfig\022\030\n\013entry_count\030\006 \001(\005B\003\340"
- + "A\003\0224\n\013submit_time\030\007 \001(\0132\032.google.protobu"
- + "f.TimestampB\003\340A\003\0221\n\010end_time\030\010 \001(\0132\032.goo"
- + "gle.protobuf.TimestampB\003\340A\003\032N\n\020LanguageC"
- + "odePair\022\034\n\024source_language_code\030\001 \001(\t\022\034\n"
- + "\024target_language_code\030\002 \001(\t\032*\n\020LanguageC"
- + "odesSet\022\026\n\016language_codes\030\001 \003(\t:e\352Ab\n!tr"
- + "anslate.googleapis.com/Glossary\022=project"
- + "s/{project}/locations/{location}/glossar"
- + "ies/{glossary}B\013\n\tlanguages\"\225\001\n\025CreateGl"
- + "ossaryRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!l"
- + "ocations.googleapis.com/Location\022A\n\010glos"
- + "sary\030\002 \001(\0132*.google.cloud.translation.v3"
- + "beta1.GlossaryB\003\340A\002\"M\n\022GetGlossaryReques"
- + "t\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!translate.googl"
- + "eapis.com/Glossary\"P\n\025DeleteGlossaryRequ"
- + "est\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!translate.goo"
- + "gleapis.com/Glossary\"\230\001\n\025ListGlossariesR"
- + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location"
- + "s.googleapis.com/Location\022\026\n\tpage_size\030\002"
- + " \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006fi"
- + "lter\030\004 \001(\tB\003\340A\001\"q\n\026ListGlossariesRespons"
- + "e\022>\n\nglossaries\030\001 \003(\0132*.google.cloud.tra"
- + "nslation.v3beta1.Glossary\022\027\n\017next_page_t"
- + "oken\030\002 \001(\t\"\215\002\n\026CreateGlossaryMetadata\022\014\n"
- + "\004name\030\001 \001(\t\022M\n\005state\030\002 \001(\0162>.google.clou"
- + "d.translation.v3beta1.CreateGlossaryMeta"
- + "data.State\022/\n\013submit_time\030\003 \001(\0132\032.google"
- + ".protobuf.Timestamp\"e\n\005State\022\025\n\021STATE_UN"
- + "SPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022"
- + "\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED"
- + "\020\005\"\215\002\n\026DeleteGlossaryMetadata\022\014\n\004name\030\001 "
- + "\001(\t\022M\n\005state\030\002 \001(\0162>.google.cloud.transl"
- + "ation.v3beta1.DeleteGlossaryMetadata.Sta"
- + "te\022/\n\013submit_time\030\003 \001(\0132\032.google.protobu"
- + "f.Timestamp\"e\n\005State\022\025\n\021STATE_UNSPECIFIE"
- + "D\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILE"
- + "D\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\"\205\001\n\026D"
- + "eleteGlossaryResponse\022\014\n\004name\030\001 \001(\t\022/\n\013s"
- + "ubmit_time\030\002 \001(\0132\032.google.protobuf.Times"
- + "tamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobuf"
- + ".Timestamp2\232\020\n\022TranslationService\022\364\001\n\rTr"
- + "anslateText\0226.google.cloud.translation.v"
- + "3beta1.TranslateTextRequest\0327.google.clo"
- + "ud.translation.v3beta1.TranslateTextResp"
- + "onse\"r\202\323\344\223\002l\"6/v3beta1/{parent=projects/"
- + "*/locations/*}:translateText:\001*Z/\"*/v3be"
- + "ta1/{parent=projects/*}:translateText:\001*"
- + "\022\223\002\n\016DetectLanguage\0227.google.cloud.trans"
- + "lation.v3beta1.DetectLanguageRequest\0328.g"
- + "oogle.cloud.translation.v3beta1.DetectLa"
- + "nguageResponse\"\215\001\202\323\344\223\002n\"7/v3beta1/{paren"
- + "t=projects/*/locations/*}:detectLanguage"
- + ":\001*Z0\"+/v3beta1/{parent=projects/*}:dete"
- + "ctLanguage:\001*\332A\026parent,model,mime_type\022\253"
- + "\002\n\025GetSupportedLanguages\022>.google.cloud."
- + "translation.v3beta1.GetSupportedLanguage"
- + "sRequest\0324.google.cloud.translation.v3be"
- + "ta1.SupportedLanguages\"\233\001\202\323\344\223\002p\022;/v3beta"
- + "1/{parent=projects/*/locations/*}/suppor"
- + "tedLanguagesZ1\022//v3beta1/{parent=project"
- + "s/*}/supportedLanguages\332A\"parent,display"
- + "_language_code,model\022\353\001\n\022BatchTranslateT"
- + "ext\022;.google.cloud.translation.v3beta1.B"
- + "atchTranslateTextRequest\032\035.google.longru"
- + "nning.Operation\"y\202\323\344\223\002@\";/v3beta1/{paren"
- + "t=projects/*/locations/*}:batchTranslate"
- + "Text:\001*\312A0\n\026BatchTranslateResponse\022\026Batc"
- + "hTranslateMetadata\022\346\001\n\016CreateGlossary\0227."
- + "google.cloud.translation.v3beta1.CreateG"
- + "lossaryRequest\032\035.google.longrunning.Oper"
- + "ation\"|\202\323\344\223\002?\"3/v3beta1/{parent=projects"
- + "/*/locations/*}/glossaries:\010glossary\332A\017p"
- + "arent,glossary\312A\"\n\010Glossary\022\026CreateGloss"
- + "aryMetadata\022\331\001\n\016ListGlossaries\0227.google."
- + "cloud.translation.v3beta1.ListGlossaries"
- + "Request\0328.google.cloud.translation.v3bet"
- + "a1.ListGlossariesResponse\"T\202\323\344\223\0025\0223/v3be"
- + "ta1/{parent=projects/*/locations/*}/glos"
- + "saries\332A\006parent\332A\rparent,filter\022\263\001\n\013GetG"
- + "lossary\0224.google.cloud.translation.v3bet"
- + "a1.GetGlossaryRequest\032*.google.cloud.tra"
- + "nslation.v3beta1.Glossary\"B\202\323\344\223\0025\0223/v3be"
- + "ta1/{name=projects/*/locations/*/glossar"
- + "ies/*}\332A\004name\022\337\001\n\016DeleteGlossary\0227.googl"
- + "e.cloud.translation.v3beta1.DeleteGlossa"
- + "ryRequest\032\035.google.longrunning.Operation"
- + "\"u\202\323\344\223\0025*3/v3beta1/{name=projects/*/loca"
- + "tions/*/glossaries/*}\332A\004name\312A0\n\026DeleteG"
- + "lossaryResponse\022\026DeleteGlossaryMetadata\032"
- + "~\312A\030translate.googleapis.com\322A`https://w"
- + "ww.googleapis.com/auth/cloud-platform,ht"
- + "tps://www.googleapis.com/auth/cloud-tran"
- + "slationB\361\001\n\"com.google.cloud.translate.v"
- + "3beta1B\027TranslationServiceProtoP\001ZGgoogl"
- + "e.golang.org/genproto/googleapis/cloud/t"
- + "ranslate/v3beta1;translate\370\001\001\252\002\036Google.C"
- + "loud.Translate.V3Beta1\312\002\036Google\\Cloud\\Tr"
- + "anslate\\V3beta1\352\002!Google::Cloud::Transla"
- + "te::V3beta1b\006proto3"
+ + "CELLING\020\004\022\r\n\tCANCELLED\020\005\"\215\002\n\026DeleteGloss"
+ + "aryMetadata\022\014\n\004name\030\001 \001(\t\022M\n\005state\030\002 \001(\016"
+ + "2>.google.cloud.translation.v3beta1.Dele"
+ + "teGlossaryMetadata.State\022/\n\013submit_time\030"
+ + "\003 \001(\0132\032.google.protobuf.Timestamp\"e\n\005Sta"
+ + "te\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r"
+ + "\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020"
+ + "\004\022\r\n\tCANCELLED\020\005\"\205\001\n\026DeleteGlossaryRespo"
+ + "nse\022\014\n\004name\030\001 \001(\t\022/\n\013submit_time\030\002 \001(\0132\032"
+ + ".google.protobuf.Timestamp\022,\n\010end_time\030\003"
+ + " \001(\0132\032.google.protobuf.Timestamp\"\231\005\n\035Bat"
+ + "chTranslateDocumentRequest\022\023\n\006parent\030\001 \001"
+ + "(\tB\003\340A\002\022!\n\024source_language_code\030\002 \001(\tB\003\340"
+ + "A\002\022\"\n\025target_language_codes\030\003 \003(\tB\003\340A\002\022V"
+ + "\n\rinput_configs\030\004 \003(\0132:.google.cloud.tra"
+ + "nslation.v3beta1.BatchDocumentInputConfi"
+ + "gB\003\340A\002\022W\n\routput_config\030\005 \001(\0132;.google.c"
+ + "loud.translation.v3beta1.BatchDocumentOu"
+ + "tputConfigB\003\340A\002\022`\n\006models\030\006 \003(\0132K.google"
+ + ".cloud.translation.v3beta1.BatchTranslat"
+ + "eDocumentRequest.ModelsEntryB\003\340A\001\022h\n\nglo"
+ + "ssaries\030\007 \003(\0132O.google.cloud.translation"
+ + ".v3beta1.BatchTranslateDocumentRequest.G"
+ + "lossariesEntryB\003\340A\001\032-\n\013ModelsEntry\022\013\n\003ke"
+ + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032p\n\017Glossaries"
+ + "Entry\022\013\n\003key\030\001 \001(\t\022L\n\005value\030\002 \001(\0132=.goog"
+ + "le.cloud.translation.v3beta1.TranslateTe"
+ + "xtGlossaryConfig:\0028\001\"g\n\030BatchDocumentInp"
+ + "utConfig\022A\n\ngcs_source\030\001 \001(\0132+.google.cl"
+ + "oud.translation.v3beta1.GcsSourceH\000B\010\n\006s"
+ + "ource\"w\n\031BatchDocumentOutputConfig\022K\n\017gc"
+ + "s_destination\030\001 \001(\01320.google.cloud.trans"
+ + "lation.v3beta1.GcsDestinationH\000B\r\n\013desti"
+ + "nation\"\331\002\n\036BatchTranslateDocumentRespons"
+ + "e\022\023\n\013total_pages\030\001 \001(\003\022\030\n\020translated_pag"
+ + "es\030\002 \001(\003\022\024\n\014failed_pages\030\003 \001(\003\022\034\n\024total_"
+ + "billable_pages\030\004 \001(\003\022\030\n\020total_characters"
+ + "\030\005 \001(\003\022\035\n\025translated_characters\030\006 \001(\003\022\031\n"
+ + "\021failed_characters\030\007 \001(\003\022!\n\031total_billab"
+ + "le_characters\030\010 \001(\003\022/\n\013submit_time\030\t \001(\013"
+ + "2\032.google.protobuf.Timestamp\022,\n\010end_time"
+ + "\030\n \001(\0132\032.google.protobuf.Timestamp\"\351\003\n\036B"
+ + "atchTranslateDocumentMetadata\022U\n\005state\030\001"
+ + " \001(\0162F.google.cloud.translation.v3beta1."
+ + "BatchTranslateDocumentMetadata.State\022\023\n\013"
+ + "total_pages\030\002 \001(\003\022\030\n\020translated_pages\030\003 "
+ + "\001(\003\022\024\n\014failed_pages\030\004 \001(\003\022\034\n\024total_billa"
+ + "ble_pages\030\005 \001(\003\022\030\n\020total_characters\030\006 \001("
+ + "\003\022\035\n\025translated_characters\030\007 \001(\003\022\031\n\021fail"
+ + "ed_characters\030\010 \001(\003\022!\n\031total_billable_ch"
+ + "aracters\030\t \001(\003\022/\n\013submit_time\030\n \001(\0132\032.go"
+ + "ogle.protobuf.Timestamp\"e\n\005State\022\025\n\021STAT"
+ + "E_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\r\n\tSUCCEEDE"
+ + "D\020\002\022\n\n\006FAILED\020\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCE"
+ + "LLED\020\0052\362\023\n\022TranslationService\022\364\001\n\rTransl"
+ + "ateText\0226.google.cloud.translation.v3bet"
+ + "a1.TranslateTextRequest\0327.google.cloud.t"
+ + "ranslation.v3beta1.TranslateTextResponse"
+ + "\"r\202\323\344\223\002l\"6/v3beta1/{parent=projects/*/lo"
+ + "cations/*}:translateText:\001*Z/\"*/v3beta1/"
+ + "{parent=projects/*}:translateText:\001*\022\223\002\n"
+ + "\016DetectLanguage\0227.google.cloud.translati"
+ + "on.v3beta1.DetectLanguageRequest\0328.googl"
+ + "e.cloud.translation.v3beta1.DetectLangua"
+ + "geResponse\"\215\001\202\323\344\223\002n\"7/v3beta1/{parent=pr"
+ + "ojects/*/locations/*}:detectLanguage:\001*Z"
+ + "0\"+/v3beta1/{parent=projects/*}:detectLa"
+ + "nguage:\001*\332A\026parent,model,mime_type\022\253\002\n\025G"
+ + "etSupportedLanguages\022>.google.cloud.tran"
+ + "slation.v3beta1.GetSupportedLanguagesReq"
+ + "uest\0324.google.cloud.translation.v3beta1."
+ + "SupportedLanguages\"\233\001\202\323\344\223\002p\022;/v3beta1/{p"
+ + "arent=projects/*/locations/*}/supportedL"
+ + "anguagesZ1\022//v3beta1/{parent=projects/*}"
+ + "/supportedLanguages\332A\"parent,display_lan"
+ + "guage_code,model\022\323\001\n\021TranslateDocument\022:"
+ + ".google.cloud.translation.v3beta1.Transl"
+ + "ateDocumentRequest\032;.google.cloud.transl"
+ + "ation.v3beta1.TranslateDocumentResponse\""
+ + "E\202\323\344\223\002?\":/v3beta1/{parent=projects/*/loc"
+ + "ations/*}:translateDocument:\001*\022\353\001\n\022Batch"
+ + "TranslateText\022;.google.cloud.translation"
+ + ".v3beta1.BatchTranslateTextRequest\032\035.goo"
+ + "gle.longrunning.Operation\"y\202\323\344\223\002@\";/v3be"
+ + "ta1/{parent=projects/*/locations/*}:batc"
+ + "hTranslateText:\001*\312A0\n\026BatchTranslateResp"
+ + "onse\022\026BatchTranslateMetadata\022\210\002\n\026BatchTr"
+ + "anslateDocument\022?.google.cloud.translati"
+ + "on.v3beta1.BatchTranslateDocumentRequest"
+ + "\032\035.google.longrunning.Operation\"\215\001\202\323\344\223\002D"
+ + "\"?/v3beta1/{parent=projects/*/locations/"
+ + "*}:batchTranslateDocument:\001*\312A@\n\036BatchTr"
+ + "anslateDocumentResponse\022\036BatchTranslateD"
+ + "ocumentMetadata\022\346\001\n\016CreateGlossary\0227.goo"
+ + "gle.cloud.translation.v3beta1.CreateGlos"
+ + "saryRequest\032\035.google.longrunning.Operati"
+ + "on\"|\202\323\344\223\002?\"3/v3beta1/{parent=projects/*/"
+ + "locations/*}/glossaries:\010glossary\332A\017pare"
+ + "nt,glossary\312A\"\n\010Glossary\022\026CreateGlossary"
+ + "Metadata\022\320\001\n\016ListGlossaries\0227.google.clo"
+ + "ud.translation.v3beta1.ListGlossariesReq"
+ + "uest\0328.google.cloud.translation.v3beta1."
+ + "ListGlossariesResponse\"K\202\323\344\223\0025\0223/v3beta1"
+ + "/{parent=projects/*/locations/*}/glossar"
+ + "ies\332A\rparent,filter\022\263\001\n\013GetGlossary\0224.go"
+ + "ogle.cloud.translation.v3beta1.GetGlossa"
+ + "ryRequest\032*.google.cloud.translation.v3b"
+ + "eta1.Glossary\"B\202\323\344\223\0025\0223/v3beta1/{name=pr"
+ + "ojects/*/locations/*/glossaries/*}\332A\004nam"
+ + "e\022\337\001\n\016DeleteGlossary\0227.google.cloud.tran"
+ + "slation.v3beta1.DeleteGlossaryRequest\032\035."
+ + "google.longrunning.Operation\"u\202\323\344\223\0025*3/v"
+ + "3beta1/{name=projects/*/locations/*/glos"
+ + "saries/*}\332A\004name\312A0\n\026DeleteGlossaryRespo"
+ + "nse\022\026DeleteGlossaryMetadata\032~\312A\030translat"
+ + "e.googleapis.com\322A`https://www.googleapi"
+ + "s.com/auth/cloud-platform,https://www.go"
+ + "ogleapis.com/auth/cloud-translationB\361\001\n\""
+ + "com.google.cloud.translate.v3beta1B\027Tran"
+ + "slationServiceProtoP\001ZGgoogle.golang.org"
+ + "/genproto/googleapis/cloud/translate/v3b"
+ + "eta1;translate\370\001\001\252\002\036Google.Cloud.Transla"
+ + "te.V3Beta1\312\002\036Google\\Cloud\\Translate\\V3be"
+ + "ta1\352\002!Google::Cloud::Translate::V3beta1b"
+ + "\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -523,8 +662,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"GcsDestination", "Destination",
});
- internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor =
+ internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_descriptor =
getDescriptor().getMessageTypes().get(14);
+ internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_DocumentInputConfig_descriptor,
+ new java.lang.String[] {
+ "Content", "GcsSource", "MimeType", "Source",
+ });
+ internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_descriptor =
+ getDescriptor().getMessageTypes().get(15);
+ internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_DocumentOutputConfig_descriptor,
+ new java.lang.String[] {
+ "GcsDestination", "MimeType", "Destination",
+ });
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_descriptor =
+ getDescriptor().getMessageTypes().get(16);
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_descriptor,
+ new java.lang.String[] {
+ "Parent",
+ "SourceLanguageCode",
+ "TargetLanguageCode",
+ "DocumentInputConfig",
+ "DocumentOutputConfig",
+ "Model",
+ "GlossaryConfig",
+ "Labels",
+ });
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_LabelsEntry_descriptor =
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_LabelsEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentRequest_LabelsEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ internal_static_google_cloud_translation_v3beta1_DocumentTranslation_descriptor =
+ getDescriptor().getMessageTypes().get(17);
+ internal_static_google_cloud_translation_v3beta1_DocumentTranslation_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_DocumentTranslation_descriptor,
+ new java.lang.String[] {
+ "ByteStreamOutputs", "MimeType", "DetectedLanguageCode",
+ });
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_descriptor =
+ getDescriptor().getMessageTypes().get(18);
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_TranslateDocumentResponse_descriptor,
+ new java.lang.String[] {
+ "DocumentTranslation", "GlossaryDocumentTranslation", "Model", "GlossaryConfig",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor =
+ getDescriptor().getMessageTypes().get(19);
internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor,
@@ -569,7 +765,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Key", "Value",
});
internal_static_google_cloud_translation_v3beta1_BatchTranslateMetadata_descriptor =
- getDescriptor().getMessageTypes().get(15);
+ getDescriptor().getMessageTypes().get(20);
internal_static_google_cloud_translation_v3beta1_BatchTranslateMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_BatchTranslateMetadata_descriptor,
@@ -577,7 +773,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"State", "TranslatedCharacters", "FailedCharacters", "TotalCharacters", "SubmitTime",
});
internal_static_google_cloud_translation_v3beta1_BatchTranslateResponse_descriptor =
- getDescriptor().getMessageTypes().get(16);
+ getDescriptor().getMessageTypes().get(21);
internal_static_google_cloud_translation_v3beta1_BatchTranslateResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_BatchTranslateResponse_descriptor,
@@ -589,7 +785,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"EndTime",
});
internal_static_google_cloud_translation_v3beta1_GlossaryInputConfig_descriptor =
- getDescriptor().getMessageTypes().get(17);
+ getDescriptor().getMessageTypes().get(22);
internal_static_google_cloud_translation_v3beta1_GlossaryInputConfig_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_GlossaryInputConfig_descriptor,
@@ -597,7 +793,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"GcsSource", "Source",
});
internal_static_google_cloud_translation_v3beta1_Glossary_descriptor =
- getDescriptor().getMessageTypes().get(18);
+ getDescriptor().getMessageTypes().get(23);
internal_static_google_cloud_translation_v3beta1_Glossary_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_Glossary_descriptor,
@@ -632,7 +828,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"LanguageCodes",
});
internal_static_google_cloud_translation_v3beta1_CreateGlossaryRequest_descriptor =
- getDescriptor().getMessageTypes().get(19);
+ getDescriptor().getMessageTypes().get(24);
internal_static_google_cloud_translation_v3beta1_CreateGlossaryRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_CreateGlossaryRequest_descriptor,
@@ -640,7 +836,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "Glossary",
});
internal_static_google_cloud_translation_v3beta1_GetGlossaryRequest_descriptor =
- getDescriptor().getMessageTypes().get(20);
+ getDescriptor().getMessageTypes().get(25);
internal_static_google_cloud_translation_v3beta1_GetGlossaryRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_GetGlossaryRequest_descriptor,
@@ -648,7 +844,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name",
});
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryRequest_descriptor =
- getDescriptor().getMessageTypes().get(21);
+ getDescriptor().getMessageTypes().get(26);
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryRequest_descriptor,
@@ -656,7 +852,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name",
});
internal_static_google_cloud_translation_v3beta1_ListGlossariesRequest_descriptor =
- getDescriptor().getMessageTypes().get(22);
+ getDescriptor().getMessageTypes().get(27);
internal_static_google_cloud_translation_v3beta1_ListGlossariesRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_ListGlossariesRequest_descriptor,
@@ -664,7 +860,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Parent", "PageSize", "PageToken", "Filter",
});
internal_static_google_cloud_translation_v3beta1_ListGlossariesResponse_descriptor =
- getDescriptor().getMessageTypes().get(23);
+ getDescriptor().getMessageTypes().get(28);
internal_static_google_cloud_translation_v3beta1_ListGlossariesResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_ListGlossariesResponse_descriptor,
@@ -672,7 +868,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Glossaries", "NextPageToken",
});
internal_static_google_cloud_translation_v3beta1_CreateGlossaryMetadata_descriptor =
- getDescriptor().getMessageTypes().get(24);
+ getDescriptor().getMessageTypes().get(29);
internal_static_google_cloud_translation_v3beta1_CreateGlossaryMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_CreateGlossaryMetadata_descriptor,
@@ -680,7 +876,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name", "State", "SubmitTime",
});
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryMetadata_descriptor =
- getDescriptor().getMessageTypes().get(25);
+ getDescriptor().getMessageTypes().get(30);
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryMetadata_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryMetadata_descriptor,
@@ -688,13 +884,97 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name", "State", "SubmitTime",
});
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_descriptor =
- getDescriptor().getMessageTypes().get(26);
+ getDescriptor().getMessageTypes().get(31);
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_translation_v3beta1_DeleteGlossaryResponse_descriptor,
new java.lang.String[] {
"Name", "SubmitTime", "EndTime",
});
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_descriptor =
+ getDescriptor().getMessageTypes().get(32);
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_descriptor,
+ new java.lang.String[] {
+ "Parent",
+ "SourceLanguageCode",
+ "TargetLanguageCodes",
+ "InputConfigs",
+ "OutputConfig",
+ "Models",
+ "Glossaries",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_ModelsEntry_descriptor =
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_descriptor
+ .getNestedTypes()
+ .get(0);
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_ModelsEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_ModelsEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_GlossariesEntry_descriptor =
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_descriptor
+ .getNestedTypes()
+ .get(1);
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_GlossariesEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentRequest_GlossariesEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_descriptor =
+ getDescriptor().getMessageTypes().get(33);
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentInputConfig_descriptor,
+ new java.lang.String[] {
+ "GcsSource", "Source",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_descriptor =
+ getDescriptor().getMessageTypes().get(34);
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchDocumentOutputConfig_descriptor,
+ new java.lang.String[] {
+ "GcsDestination", "Destination",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_descriptor =
+ getDescriptor().getMessageTypes().get(35);
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentResponse_descriptor,
+ new java.lang.String[] {
+ "TotalPages",
+ "TranslatedPages",
+ "FailedPages",
+ "TotalBillablePages",
+ "TotalCharacters",
+ "TranslatedCharacters",
+ "FailedCharacters",
+ "TotalBillableCharacters",
+ "SubmitTime",
+ "EndTime",
+ });
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_descriptor =
+ getDescriptor().getMessageTypes().get(36);
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_translation_v3beta1_BatchTranslateDocumentMetadata_descriptor,
+ new java.lang.String[] {
+ "State",
+ "TotalPages",
+ "TranslatedPages",
+ "FailedPages",
+ "TotalBillablePages",
+ "TotalCharacters",
+ "TranslatedCharacters",
+ "FailedCharacters",
+ "TotalBillableCharacters",
+ "SubmitTime",
+ });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ClientProto.defaultHost);
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 ef49f000..6c10de0f 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
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC.
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-//
syntax = "proto3";
@@ -68,7 +67,8 @@ service TranslationService {
}
// Returns a list of supported languages for translation.
- rpc GetSupportedLanguages(GetSupportedLanguagesRequest) returns (SupportedLanguages) {
+ rpc GetSupportedLanguages(GetSupportedLanguagesRequest)
+ returns (SupportedLanguages) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*}/supportedLanguages"
additional_bindings {
@@ -78,6 +78,15 @@ service TranslationService {
option (google.api.method_signature) = "parent,display_language_code,model";
}
+ // Translates documents in synchronous mode.
+ rpc TranslateDocument(TranslateDocumentRequest)
+ returns (TranslateDocumentResponse) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}:translateDocument"
+ body: "*"
+ };
+ }
+
// Translates a large volume of text 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
@@ -85,7 +94,8 @@ service TranslationService {
//
// This call returns immediately and you can
// use google.longrunning.Operation.name to poll the status of the call.
- rpc BatchTranslateText(BatchTranslateTextRequest) returns (google.longrunning.Operation) {
+ rpc BatchTranslateText(BatchTranslateTextRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateText"
body: "*"
@@ -96,9 +106,29 @@ service TranslationService {
};
}
+ // 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.
+ rpc BatchTranslateDocument(BatchTranslateDocumentRequest)
+ returns (google.longrunning.Operation) {
+ option (google.api.http) = {
+ post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateDocument"
+ body: "*"
+ };
+ option (google.longrunning.operation_info) = {
+ response_type: "BatchTranslateDocumentResponse"
+ metadata_type: "BatchTranslateDocumentMetadata"
+ };
+ }
+
// Creates a glossary and returns the long-running operation. Returns
// NOT_FOUND, if the project doesn't exist.
- rpc CreateGlossary(CreateGlossaryRequest) returns (google.longrunning.Operation) {
+ rpc CreateGlossary(CreateGlossaryRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*}/glossaries"
body: "glossary"
@@ -116,7 +146,6 @@ service TranslationService {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*}/glossaries"
};
- option (google.api.method_signature) = "parent";
option (google.api.method_signature) = "parent,filter";
}
@@ -132,7 +161,8 @@ service TranslationService {
// Deletes a glossary, or cancels glossary construction
// if the glossary isn't created yet.
// Returns NOT_FOUND, if the glossary doesn't exist.
- rpc DeleteGlossary(DeleteGlossaryRequest) returns (google.longrunning.Operation) {
+ rpc DeleteGlossary(DeleteGlossaryRequest)
+ returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v3beta1/{name=projects/*/locations/*/glossaries/*}"
};
@@ -159,7 +189,8 @@ message TranslateTextGlossaryConfig {
// The request message for synchronous translation.
message TranslateTextRequest {
// Required. The content of the input in string format.
- // We recommend the total content be less than 30k codepoints.
+ // We recommend the total content be less than 30k codepoints. The max length
+ // of this field is 1024.
// Use BatchTranslateText for larger text.
repeated string contents = 1 [(google.api.field_behavior) = REQUIRED];
@@ -181,11 +212,11 @@ message TranslateTextRequest {
// Required. Project or location to make a call. Must refer to a caller's
// project.
//
- // Format: `projects/{project-id}` or
- // `projects/{project-id}/locations/{location-id}`.
+ // Format: `projects/{project-number-or-id}` or
+ // `projects/{project-number-or-id}/locations/{location-id}`.
//
- // For global calls, use `projects/{project-id}/locations/global` or
- // `projects/{project-id}`.
+ // For global calls, use `projects/{project-number-or-id}/locations/global` or
+ // `projects/{project-number-or-id}`.
//
// Non-global location is required for requests using AutoML models or
// custom glossaries.
@@ -204,16 +235,16 @@ message TranslateTextRequest {
// The format depends on model type:
//
// - AutoML Translation models:
- // `projects/{project-id}/locations/{location-id}/models/{model-id}`
+ // `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}`
//
// - General (built-in) models:
- // `projects/{project-id}/locations/{location-id}/models/general/nmt`,
- // `projects/{project-id}/locations/{location-id}/models/general/base`
+ // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`,
+ // `projects/{project-number-or-id}/locations/{location-id}/models/general/base`
//
//
// For global (non-regionalized) requests, use `location-id` `global`.
// For example,
- // `projects/{project-id}/locations/global/models/general/nmt`.
+ // `projects/{project-number-or-id}/locations/global/models/general/nmt`.
//
// If missing, the system decides which google base model to use.
string model = 6 [(google.api.field_behavior) = OPTIONAL];
@@ -221,7 +252,8 @@ message TranslateTextRequest {
// Optional. Glossary to be applied. The glossary must be
// within the same region (have the same location-id) as the model, otherwise
// an INVALID_ARGUMENT (400) error is returned.
- TranslateTextGlossaryConfig glossary_config = 7 [(google.api.field_behavior) = OPTIONAL];
+ TranslateTextGlossaryConfig glossary_config = 7
+ [(google.api.field_behavior) = OPTIONAL];
// Optional. The labels with user-defined metadata for the request.
//
@@ -242,8 +274,8 @@ message TranslateTextResponse {
// Text translation responses if a glossary is provided in the request.
// This can be the same as
- // [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations] if no terms apply.
- // This field has the same length as
+ // [`translations`][google.cloud.translation.v3beta1.TranslateTextResponse.translations]
+ // if no terms apply. This field has the same length as
// [`contents`][google.cloud.translation.v3beta1.TranslateTextRequest.contents].
repeated Translation glossary_translations = 3;
}
@@ -254,7 +286,13 @@ message Translation {
string translated_text = 1;
// Only present when `model` is present in the request.
- // This is same as `model` provided in the request.
+ // `model` here is normalized to have project number.
+ //
+ // For example:
+ // If the `model` requested in TranslationTextRequest is
+ // `projects/{project-id}/locations/{location-id}/models/general/nmt` then
+ // `model` here would be normalized to
+ // `projects/{project-number}/locations/{location-id}/models/general/nmt`.
string model = 2;
// The BCP-47 language code of source text in the initial request, detected
@@ -272,13 +310,13 @@ message DetectLanguageRequest {
// Required. Project or location to make a call. Must refer to a caller's
// project.
//
- // Format: `projects/{project-id}/locations/{location-id}` or
- // `projects/{project-id}`.
+ // Format: `projects/{project-number-or-id}/locations/{location-id}` or
+ // `projects/{project-number-or-id}`.
//
- // For global calls, use `projects/{project-id}/locations/global` or
- // `projects/{project-id}`.
+ // For global calls, use `projects/{project-number-or-id}/locations/global` or
+ // `projects/{project-number-or-id}`.
//
- // Only models within the same region (has same location-id) can be used.
+ // Only models within the same region, which have the same location-id, can be used.
// Otherwise an INVALID_ARGUMENT (400) error is returned.
string parent = 5 [
(google.api.field_behavior) = REQUIRED,
@@ -290,10 +328,10 @@ message DetectLanguageRequest {
// Optional. The language detection model to be used.
//
// Format:
- // `projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}`
+ // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}`
//
// Only one language detection model is currently supported:
- // `projects/{project-id}/locations/{location-id}/models/language-detection/default`.
+ // `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`.
//
// If not specified, the default model is used.
string model = 4 [(google.api.field_behavior) = OPTIONAL];
@@ -316,7 +354,7 @@ message DetectLanguageRequest {
// Label values are optional. Label keys must start with a letter.
//
// See https://cloud.google.com/translate/docs/labels for more information.
- map