All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.translate.v3beta1.BatchTranslateTextRequest Maven / Gradle / Ivy

There is a newer version: 0.136.0
Show newest version
/*
 * Copyright 2024 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

// Protobuf Java Version: 3.25.4
package com.google.cloud.translate.v3beta1;

/**
 *
 *
 * 
 * The batch translation request.
 * 
* * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateTextRequest} */ public final class BatchTranslateTextRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.translation.v3beta1.BatchTranslateTextRequest) BatchTranslateTextRequestOrBuilder { private static final long serialVersionUID = 0L; // Use BatchTranslateTextRequest.newBuilder() to construct. private BatchTranslateTextRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BatchTranslateTextRequest() { parent_ = ""; sourceLanguageCode_ = ""; targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.emptyList(); inputConfigs_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BatchTranslateTextRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetModels(); case 7: return internalGetGlossaries(); case 9: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.class, com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.Builder.class); } private int bitField0_; public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; /** * * *
   * Required. Location to make a call. Must refer to a caller's project.
   *
   * 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, (.google.api.resource_reference) = { ... } * * * @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 call. Must refer to a caller's project.
   *
   * 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, (.google.api.resource_reference) = { ... } * * * @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; @SuppressWarnings("serial") private volatile java.lang.Object sourceLanguageCode_ = ""; /** * * *
   * Required. Source language code.
   * 
* * 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. Source language code.
   * 
* * 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; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
   * Required. 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. 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. 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. 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 MODELS_FIELD_NUMBER = 4; private static final class ModelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_ModelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField models_; private com.google.protobuf.MapField internalGetModels() { if (models_ == null) { return com.google.protobuf.MapField.emptyMapField(ModelsDefaultEntryHolder.defaultEntry); } return models_; } public int getModelsCount() { return internalGetModels().getMap().size(); } /** * * *
   * 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,
   * 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`,
   *
   *
   * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsModels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetModels().getMap().containsKey(key); } /** Use {@link #getModelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getModels() { return getModelsMap(); } /** * * *
   * 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,
   * 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`,
   *
   *
   * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getModelsMap() { return internalGetModels().getMap(); } /** * * *
   * 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,
   * 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`,
   *
   *
   * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getModelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetModels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * 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,
   * 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`,
   *
   *
   * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getModelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetModels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int INPUT_CONFIGS_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List inputConfigs_; /** * * *
   * Required. Input configurations.
   * 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.
   * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getInputConfigsList() { return inputConfigs_; } /** * * *
   * Required. Input configurations.
   * 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.
   * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public java.util.List getInputConfigsOrBuilderList() { return inputConfigs_; } /** * * *
   * Required. Input configurations.
   * 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.
   * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.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 should be <= 100M Unicode codepoints.
   * The files must use UTF-8 encoding.
   * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.translate.v3beta1.InputConfig getInputConfigs(int index) { return inputConfigs_.get(index); } /** * * *
   * Required. Input configurations.
   * 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.
   * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.translate.v3beta1.InputConfigOrBuilder getInputConfigsOrBuilder( int index) { return inputConfigs_.get(index); } public static final int OUTPUT_CONFIG_FIELD_NUMBER = 6; private com.google.cloud.translate.v3beta1.OutputConfig 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the outputConfig field is set. */ @java.lang.Override public boolean hasOutputConfig() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return The outputConfig. */ @java.lang.Override public com.google.cloud.translate.v3beta1.OutputConfig getOutputConfig() { return outputConfig_ == null ? com.google.cloud.translate.v3beta1.OutputConfig.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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.translate.v3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { return outputConfig_ == null ? com.google.cloud.translate.v3beta1.OutputConfig.getDefaultInstance() : outputConfig_; } public static final int GLOSSARIES_FIELD_NUMBER = 7; private static final class GlossariesDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> defaultEntry = com.google.protobuf.MapEntry . newDefaultInstance( com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_GlossariesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig .getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> glossaries_; private com.google.protobuf.MapField< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> internalGetGlossaries() { if (glossaries_ == null) { return com.google.protobuf.MapField.emptyMapField(GlossariesDefaultEntryHolder.defaultEntry); } return glossaries_; } public int getGlossariesCount() { return internalGetGlossaries().getMap().size(); } /** * * *
   * Optional. Glossaries to be applied for translation.
   * 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 NullPointerException("map key"); } 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 for translation.
   * 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 for translation.
   * 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 /* nullable */ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault( java.lang.String key, /* nullable */ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetGlossaries().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Optional. Glossaries to be applied for translation.
   * 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 NullPointerException("map key"); } java.util.Map map = internalGetGlossaries().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int LABELS_FIELD_NUMBER = 9; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * 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/labels for more information.
   * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * 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/labels for more information.
   * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * 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/labels for more information.
   * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : 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/labels for more information.
   * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); } for (int i = 0; i < targetLanguageCodes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetLanguageCodes_.getRaw(i)); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetModels(), ModelsDefaultEntryHolder.defaultEntry, 4); for (int i = 0; i < inputConfigs_.size(); i++) { output.writeMessage(5, inputConfigs_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getOutputConfig()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetGlossaries(), GlossariesDefaultEntryHolder.defaultEntry, 7); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceLanguageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); } { int dataSize = 0; for (int i = 0; i < targetLanguageCodes_.size(); i++) { dataSize += computeStringSizeNoTag(targetLanguageCodes_.getRaw(i)); } size += dataSize; size += 1 * getTargetLanguageCodesList().size(); } for (java.util.Map.Entry entry : internalGetModels().getMap().entrySet()) { com.google.protobuf.MapEntry models__ = ModelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, models__); } for (int i = 0; i < inputConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, inputConfigs_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOutputConfig()); } for (java.util.Map.Entry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> entry : internalGetGlossaries().getMap().entrySet()) { com.google.protobuf.MapEntry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> glossaries__ = GlossariesDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, glossaries__); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); } size += getUnknownFields().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.BatchTranslateTextRequest)) { return super.equals(obj); } com.google.cloud.translate.v3beta1.BatchTranslateTextRequest other = (com.google.cloud.translate.v3beta1.BatchTranslateTextRequest) obj; if (!getParent().equals(other.getParent())) return false; if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false; if (!getTargetLanguageCodesList().equals(other.getTargetLanguageCodesList())) return false; if (!internalGetModels().equals(other.internalGetModels())) return false; if (!getInputConfigsList().equals(other.getInputConfigsList())) return false; if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { if (!getOutputConfig().equals(other.getOutputConfig())) return false; } if (!internalGetGlossaries().equals(other.internalGetGlossaries())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getSourceLanguageCode().hashCode(); if (getTargetLanguageCodesCount() > 0) { hash = (37 * hash) + TARGET_LANGUAGE_CODES_FIELD_NUMBER; hash = (53 * hash) + getTargetLanguageCodesList().hashCode(); } if (!internalGetModels().getMap().isEmpty()) { hash = (37 * hash) + MODELS_FIELD_NUMBER; hash = (53 * hash) + internalGetModels().hashCode(); } if (getInputConfigsCount() > 0) { hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getInputConfigsList().hashCode(); } if (hasOutputConfig()) { hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOutputConfig().hashCode(); } if (!internalGetGlossaries().getMap().isEmpty()) { hash = (37 * hash) + GLOSSARIES_FIELD_NUMBER; hash = (53 * hash) + internalGetGlossaries().hashCode(); } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest 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.BatchTranslateTextRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest 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.BatchTranslateTextRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest 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.BatchTranslateTextRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest 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.BatchTranslateTextRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest 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.BatchTranslateTextRequest 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.BatchTranslateTextRequest 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.BatchTranslateTextRequest 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; } /** * * *
   * The batch translation request.
   * 
* * Protobuf type {@code google.cloud.translation.v3beta1.BatchTranslateTextRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.translation.v3beta1.BatchTranslateTextRequest) com.google.cloud.translate.v3beta1.BatchTranslateTextRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetModels(); case 7: return internalGetGlossaries(); case 9: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 4: return internalGetMutableModels(); case 7: return internalGetMutableGlossaries(); case 9: return internalGetMutableLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.class, com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.Builder.class); } // Construct using com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getInputConfigsFieldBuilder(); getOutputConfigFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; parent_ = ""; sourceLanguageCode_ = ""; targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.emptyList(); internalGetMutableModels().clear(); if (inputConfigsBuilder_ == null) { inputConfigs_ = java.util.Collections.emptyList(); } else { inputConfigs_ = null; inputConfigsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); outputConfig_ = null; if (outputConfigBuilder_ != null) { outputConfigBuilder_.dispose(); outputConfigBuilder_ = null; } internalGetMutableGlossaries().clear(); internalGetMutableLabels().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.translate.v3beta1.TranslationServiceProto .internal_static_google_cloud_translation_v3beta1_BatchTranslateTextRequest_descriptor; } @java.lang.Override public com.google.cloud.translate.v3beta1.BatchTranslateTextRequest getDefaultInstanceForType() { return com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.getDefaultInstance(); } @java.lang.Override public com.google.cloud.translate.v3beta1.BatchTranslateTextRequest build() { com.google.cloud.translate.v3beta1.BatchTranslateTextRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.translate.v3beta1.BatchTranslateTextRequest buildPartial() { com.google.cloud.translate.v3beta1.BatchTranslateTextRequest result = new com.google.cloud.translate.v3beta1.BatchTranslateTextRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.translate.v3beta1.BatchTranslateTextRequest result) { if (inputConfigsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); bitField0_ = (bitField0_ & ~0x00000010); } result.inputConfigs_ = inputConfigs_; } else { result.inputConfigs_ = inputConfigsBuilder_.build(); } } private void buildPartial0( com.google.cloud.translate.v3beta1.BatchTranslateTextRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.sourceLanguageCode_ = sourceLanguageCode_; } if (((from_bitField0_ & 0x00000004) != 0)) { targetLanguageCodes_.makeImmutable(); result.targetLanguageCodes_ = targetLanguageCodes_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.models_ = internalGetModels(); result.models_.makeImmutable(); } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.outputConfig_ = outputConfigBuilder_ == null ? outputConfig_ : outputConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000040) != 0)) { result.glossaries_ = internalGetGlossaries().build(GlossariesDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000080) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.translate.v3beta1.BatchTranslateTextRequest) { return mergeFrom((com.google.cloud.translate.v3beta1.BatchTranslateTextRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.translate.v3beta1.BatchTranslateTextRequest other) { if (other == com.google.cloud.translate.v3beta1.BatchTranslateTextRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getSourceLanguageCode().isEmpty()) { sourceLanguageCode_ = other.sourceLanguageCode_; bitField0_ |= 0x00000002; onChanged(); } if (!other.targetLanguageCodes_.isEmpty()) { if (targetLanguageCodes_.isEmpty()) { targetLanguageCodes_ = other.targetLanguageCodes_; bitField0_ |= 0x00000004; } else { ensureTargetLanguageCodesIsMutable(); targetLanguageCodes_.addAll(other.targetLanguageCodes_); } onChanged(); } internalGetMutableModels().mergeFrom(other.internalGetModels()); bitField0_ |= 0x00000008; if (inputConfigsBuilder_ == null) { if (!other.inputConfigs_.isEmpty()) { if (inputConfigs_.isEmpty()) { inputConfigs_ = other.inputConfigs_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureInputConfigsIsMutable(); inputConfigs_.addAll(other.inputConfigs_); } onChanged(); } } else { if (!other.inputConfigs_.isEmpty()) { if (inputConfigsBuilder_.isEmpty()) { inputConfigsBuilder_.dispose(); inputConfigsBuilder_ = null; inputConfigs_ = other.inputConfigs_; bitField0_ = (bitField0_ & ~0x00000010); inputConfigsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getInputConfigsFieldBuilder() : null; } else { inputConfigsBuilder_.addAllMessages(other.inputConfigs_); } } } if (other.hasOutputConfig()) { mergeOutputConfig(other.getOutputConfig()); } internalGetMutableGlossaries().mergeFrom(other.internalGetGlossaries()); bitField0_ |= 0x00000040; internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000080; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { parent_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { sourceLanguageCode_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { java.lang.String s = input.readStringRequireUtf8(); ensureTargetLanguageCodesIsMutable(); targetLanguageCodes_.add(s); break; } // case 26 case 34: { com.google.protobuf.MapEntry models__ = input.readMessage( ModelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableModels() .getMutableMap() .put(models__.getKey(), models__.getValue()); bitField0_ |= 0x00000008; break; } // case 34 case 42: { com.google.cloud.translate.v3beta1.InputConfig m = input.readMessage( com.google.cloud.translate.v3beta1.InputConfig.parser(), extensionRegistry); if (inputConfigsBuilder_ == null) { ensureInputConfigsIsMutable(); inputConfigs_.add(m); } else { inputConfigsBuilder_.addMessage(m); } break; } // case 42 case 50: { input.readMessage(getOutputConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 case 58: { com.google.protobuf.MapEntry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> glossaries__ = input.readMessage( GlossariesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableGlossaries() .ensureBuilderMap() .put(glossaries__.getKey(), glossaries__.getValue()); bitField0_ |= 0x00000040; break; } // case 58 case 74: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000080; break; } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object parent_ = ""; /** * * *
     * Required. Location to make a call. Must refer to a caller's project.
     *
     * 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, (.google.api.resource_reference) = { ... } * * * @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 call. Must refer to a caller's project.
     *
     * 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, (.google.api.resource_reference) = { ... } * * * @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 call. Must refer to a caller's project.
     *
     * 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, (.google.api.resource_reference) = { ... } * * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Location to make a call. Must refer to a caller's project.
     *
     * 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, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. Location to make a call. Must refer to a caller's project.
     *
     * 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, (.google.api.resource_reference) = { ... } * * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object sourceLanguageCode_ = ""; /** * * *
     * Required. Source language code.
     * 
* * 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. Source language code.
     * 
* * 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. Source language code.
     * 
* * 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; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Required. Source language code.
     * 
* * string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearSourceLanguageCode() { sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Required. Source language code.
     * 
* * 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; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList targetLanguageCodes_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureTargetLanguageCodesIsMutable() { if (!targetLanguageCodes_.isModifiable()) { targetLanguageCodes_ = new com.google.protobuf.LazyStringArrayList(targetLanguageCodes_); } bitField0_ |= 0x00000004; } /** * * *
     * Required. 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() { targetLanguageCodes_.makeImmutable(); return targetLanguageCodes_; } /** * * *
     * Required. 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. 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. 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. 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); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. 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); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. 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 values) { ensureTargetLanguageCodesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetLanguageCodes_); bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Required. 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.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); ; onChanged(); return this; } /** * * *
     * Required. 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); bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.MapField models_; private com.google.protobuf.MapField internalGetModels() { if (models_ == null) { return com.google.protobuf.MapField.emptyMapField(ModelsDefaultEntryHolder.defaultEntry); } return models_; } private com.google.protobuf.MapField internalGetMutableModels() { if (models_ == null) { models_ = com.google.protobuf.MapField.newMapField(ModelsDefaultEntryHolder.defaultEntry); } if (!models_.isMutable()) { models_ = models_.copy(); } bitField0_ |= 0x00000008; onChanged(); return models_; } public int getModelsCount() { return internalGetModels().getMap().size(); } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsModels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetModels().getMap().containsKey(key); } /** Use {@link #getModelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getModels() { return getModelsMap(); } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getModelsMap() { return internalGetModels().getMap(); } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getModelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetModels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getModelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetModels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearModels() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableModels().getMutableMap().clear(); return this; } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder removeModels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableModels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableModels() { bitField0_ |= 0x00000008; return internalGetMutableModels().getMutableMap(); } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putModels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableModels().getMutableMap().put(key, value); bitField0_ |= 0x00000008; return this; } /** * * *
     * 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,
     * 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`,
     *
     *
     * 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 = 4 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putAllModels(java.util.Map values) { internalGetMutableModels().getMutableMap().putAll(values); bitField0_ |= 0x00000008; return this; } private java.util.List inputConfigs_ = java.util.Collections.emptyList(); private void ensureInputConfigsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { inputConfigs_ = new java.util.ArrayList(inputConfigs_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.translate.v3beta1.InputConfig, com.google.cloud.translate.v3beta1.InputConfig.Builder, com.google.cloud.translate.v3beta1.InputConfigOrBuilder> inputConfigsBuilder_; /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getInputConfigsList() { if (inputConfigsBuilder_ == null) { return java.util.Collections.unmodifiableList(inputConfigs_); } else { return inputConfigsBuilder_.getMessageList(); } } /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.InputConfig 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setInputConfigs( int index, com.google.cloud.translate.v3beta1.InputConfig 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setInputConfigs( int index, com.google.cloud.translate.v3beta1.InputConfig.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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addInputConfigs(com.google.cloud.translate.v3beta1.InputConfig 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addInputConfigs( int index, com.google.cloud.translate.v3beta1.InputConfig 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addInputConfigs( com.google.cloud.translate.v3beta1.InputConfig.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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addInputConfigs( int index, com.google.cloud.translate.v3beta1.InputConfig.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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder addAllInputConfigs( java.lang.Iterable 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearInputConfigs() { if (inputConfigsBuilder_ == null) { inputConfigs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { inputConfigsBuilder_.clear(); } return this; } /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.InputConfig.Builder getInputConfigsBuilder( int index) { return getInputConfigsFieldBuilder().getBuilder(index); } /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.InputConfigOrBuilder 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List 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 should be <= 100M Unicode codepoints.
     * The files must use UTF-8 encoding.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBuilder() { return getInputConfigsFieldBuilder() .addBuilder(com.google.cloud.translate.v3beta1.InputConfig.getDefaultInstance()); } /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.InputConfig.Builder addInputConfigsBuilder( int index) { return getInputConfigsFieldBuilder() .addBuilder(index, com.google.cloud.translate.v3beta1.InputConfig.getDefaultInstance()); } /** * * *
     * Required. Input configurations.
     * 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.
     * 
* * * repeated .google.cloud.translation.v3beta1.InputConfig input_configs = 5 [(.google.api.field_behavior) = REQUIRED]; * */ public java.util.List getInputConfigsBuilderList() { return getInputConfigsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.translate.v3beta1.InputConfig, com.google.cloud.translate.v3beta1.InputConfig.Builder, com.google.cloud.translate.v3beta1.InputConfigOrBuilder> getInputConfigsFieldBuilder() { if (inputConfigsBuilder_ == null) { inputConfigsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.translate.v3beta1.InputConfig, com.google.cloud.translate.v3beta1.InputConfig.Builder, com.google.cloud.translate.v3beta1.InputConfigOrBuilder>( inputConfigs_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); inputConfigs_ = null; } return inputConfigsBuilder_; } private com.google.cloud.translate.v3beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.translate.v3beta1.OutputConfig, com.google.cloud.translate.v3beta1.OutputConfig.Builder, com.google.cloud.translate.v3beta1.OutputConfigOrBuilder> outputConfigBuilder_; /** * * *
     * 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the outputConfig field is set. */ public boolean hasOutputConfig() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * * * @return The outputConfig. */ public com.google.cloud.translate.v3beta1.OutputConfig getOutputConfig() { if (outputConfigBuilder_ == null) { return outputConfig_ == null ? com.google.cloud.translate.v3beta1.OutputConfig.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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setOutputConfig(com.google.cloud.translate.v3beta1.OutputConfig value) { if (outputConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } outputConfig_ = value; } else { outputConfigBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setOutputConfig( com.google.cloud.translate.v3beta1.OutputConfig.Builder builderForValue) { if (outputConfigBuilder_ == null) { outputConfig_ = builderForValue.build(); } else { outputConfigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeOutputConfig(com.google.cloud.translate.v3beta1.OutputConfig value) { if (outputConfigBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && outputConfig_ != null && outputConfig_ != com.google.cloud.translate.v3beta1.OutputConfig.getDefaultInstance()) { getOutputConfigBuilder().mergeFrom(value); } else { outputConfig_ = value; } } else { outputConfigBuilder_.mergeFrom(value); } if (outputConfig_ != null) { bitField0_ |= 0x00000020; onChanged(); } 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearOutputConfig() { bitField0_ = (bitField0_ & ~0x00000020); outputConfig_ = null; if (outputConfigBuilder_ != null) { outputConfigBuilder_.dispose(); outputConfigBuilder_ = null; } onChanged(); 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.OutputConfig.Builder getOutputConfigBuilder() { bitField0_ |= 0x00000020; 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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.translate.v3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { if (outputConfigBuilder_ != null) { return outputConfigBuilder_.getMessageOrBuilder(); } else { return outputConfig_ == null ? com.google.cloud.translate.v3beta1.OutputConfig.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.OutputConfig output_config = 6 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.translate.v3beta1.OutputConfig, com.google.cloud.translate.v3beta1.OutputConfig.Builder, com.google.cloud.translate.v3beta1.OutputConfigOrBuilder> getOutputConfigFieldBuilder() { if (outputConfigBuilder_ == null) { outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.translate.v3beta1.OutputConfig, com.google.cloud.translate.v3beta1.OutputConfig.Builder, com.google.cloud.translate.v3beta1.OutputConfigOrBuilder>( getOutputConfig(), getParentForChildren(), isClean()); outputConfig_ = null; } return outputConfigBuilder_; } private static final class GlossariesConverter implements com.google.protobuf.MapFieldBuilder.Converter< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> { @java.lang.Override public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig build( com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder val) { if (val instanceof com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) { return (com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) val; } return ((com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder) val) .build(); } @java.lang.Override public com.google.protobuf.MapEntry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> defaultEntry() { return GlossariesDefaultEntryHolder.defaultEntry; } }; private static final GlossariesConverter glossariesConverter = new GlossariesConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder> glossaries_; private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder> internalGetGlossaries() { if (glossaries_ == null) { return new com.google.protobuf.MapFieldBuilder<>(glossariesConverter); } return glossaries_; } private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder> internalGetMutableGlossaries() { if (glossaries_ == null) { glossaries_ = new com.google.protobuf.MapFieldBuilder<>(glossariesConverter); } bitField0_ |= 0x00000040; onChanged(); return glossaries_; } public int getGlossariesCount() { return internalGetGlossaries().ensureBuilderMap().size(); } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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 NullPointerException("map key"); } return internalGetGlossaries().ensureBuilderMap().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 for translation.
     * 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().getImmutableMap(); } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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 /* nullable */ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig getGlossariesOrDefault( java.lang.String key, /* nullable */ com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder> map = internalGetMutableGlossaries().ensureBuilderMap(); return map.containsKey(key) ? glossariesConverter.build(map.get(key)) : defaultValue; } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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 NullPointerException("map key"); } java.util.Map< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder> map = internalGetMutableGlossaries().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return glossariesConverter.build(map.get(key)); } public Builder clearGlossaries() { bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableGlossaries().clear(); return this; } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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 NullPointerException("map key"); } internalGetMutableGlossaries().ensureBuilderMap().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() { bitField0_ |= 0x00000040; return internalGetMutableGlossaries().ensureMessageMap(); } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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 NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableGlossaries().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000040; return this; } /** * * *
     * Optional. Glossaries to be applied for translation.
     * 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) { for (java.util.Map.Entry< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig> e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableGlossaries().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000040; return this; } /** * * *
     * Optional. Glossaries to be applied for translation.
     * It's keyed by target language code.
     * 
* * * map<string, .google.cloud.translation.v3beta1.TranslateTextGlossaryConfig> glossaries = 7 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder putGlossariesBuilderIfAbsent(java.lang.String key) { java.util.Map< java.lang.String, com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder> builderMap = internalGetMutableGlossaries().ensureBuilderMap(); com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfigOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) { entry = ((com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.Builder) entry; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000080; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000080); internalGetMutableLabels().getMutableMap().clear(); 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000080; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000080; 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/labels for more information.
     * 
* * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000080; 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.BatchTranslateTextRequest) } // @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest) private static final com.google.cloud.translate.v3beta1.BatchTranslateTextRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.translate.v3beta1.BatchTranslateTextRequest(); } public static com.google.cloud.translate.v3beta1.BatchTranslateTextRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BatchTranslateTextRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.translate.v3beta1.BatchTranslateTextRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy