• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/translate/v3/translation_service.proto
18 
19 package com.google.cloud.translate.v3;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Output configuration for BatchTranslateText request.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.translation.v3.OutputConfig}
29  */
30 public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.translation.v3.OutputConfig)
33     OutputConfigOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use OutputConfig.newBuilder() to construct.
OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
OutputConfig()40   private OutputConfig() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new OutputConfig();
46   }
47 
48   @java.lang.Override
getUnknownFields()49   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
50     return this.unknownFields;
51   }
52 
getDescriptor()53   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
54     return com.google.cloud.translate.v3.TranslationServiceProto
55         .internal_static_google_cloud_translation_v3_OutputConfig_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.translate.v3.TranslationServiceProto
62         .internal_static_google_cloud_translation_v3_OutputConfig_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.translate.v3.OutputConfig.class,
65             com.google.cloud.translate.v3.OutputConfig.Builder.class);
66   }
67 
68   private int destinationCase_ = 0;
69   private java.lang.Object destination_;
70 
71   public enum DestinationCase
72       implements
73           com.google.protobuf.Internal.EnumLite,
74           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
75     GCS_DESTINATION(1),
76     DESTINATION_NOT_SET(0);
77     private final int value;
78 
DestinationCase(int value)79     private DestinationCase(int value) {
80       this.value = value;
81     }
82     /**
83      * @param value The number of the enum to look for.
84      * @return The enum associated with the given number.
85      * @deprecated Use {@link #forNumber(int)} instead.
86      */
87     @java.lang.Deprecated
valueOf(int value)88     public static DestinationCase valueOf(int value) {
89       return forNumber(value);
90     }
91 
forNumber(int value)92     public static DestinationCase forNumber(int value) {
93       switch (value) {
94         case 1:
95           return GCS_DESTINATION;
96         case 0:
97           return DESTINATION_NOT_SET;
98         default:
99           return null;
100       }
101     }
102 
getNumber()103     public int getNumber() {
104       return this.value;
105     }
106   };
107 
getDestinationCase()108   public DestinationCase getDestinationCase() {
109     return DestinationCase.forNumber(destinationCase_);
110   }
111 
112   public static final int GCS_DESTINATION_FIELD_NUMBER = 1;
113   /**
114    *
115    *
116    * <pre>
117    * Google Cloud Storage destination for output content.
118    * For every single input file (for example, gs://a/b/c.[extension]), we
119    * generate at most 2 * n output files. (n is the # of target_language_codes
120    * in the BatchTranslateTextRequest).
121    * Output files (tsv) generated are compliant with RFC 4180 except that
122    * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
123    * change record delimiters.
124    * While the input files are being processed, we write/update an index file
125    * 'index.csv'  under 'output_uri_prefix' (for example,
126    * gs://translation-test/index.csv) The index file is generated/updated as
127    * new files are being translated. The format is:
128    * input_file,target_language_code,translations_file,errors_file,
129    * glossary_translations_file,glossary_errors_file
130    * input_file is one file we matched using gcs_source.input_uri.
131    * target_language_code is provided in the request.
132    * translations_file contains the translations. (details provided below)
133    * errors_file contains the errors during processing of the file. (details
134    * below). Both translations_file and errors_file could be empty
135    * strings if we have no content to output.
136    * glossary_translations_file and glossary_errors_file are always empty
137    * strings if the input_file is tsv. They could also be empty if we have no
138    * content to output.
139    * Once a row is present in index.csv, the input/output matching never
140    * changes. Callers should also expect all the content in input_file are
141    * processed and ready to be consumed (that is, no partial output file is
142    * written).
143    * Since index.csv will be keeping updated during the process, please make
144    * sure there is no custom retention policy applied on the output bucket
145    * that may avoid file updating.
146    * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
147    * The format of translations_file (for target language code 'trg') is:
148    * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
149    * If the input file extension is tsv, the output has the following
150    * columns:
151    * Column 1: ID of the request provided in the input, if it's not
152    * provided in the input, then the input row number is used (0-based).
153    * Column 2: source sentence.
154    * Column 3: translation without applying a glossary. Empty string if there
155    * is an error.
156    * Column 4 (only present if a glossary is provided in the request):
157    * translation after applying the glossary. Empty string if there is an
158    * error applying the glossary. Could be same string as column 3 if there is
159    * no glossary applied.
160    * If input file extension is a txt or html, the translation is directly
161    * written to the output file. If glossary is requested, a separate
162    * glossary_translations_file has format of
163    * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
164    * The format of errors file (for target language code 'trg') is:
165    * gs://translation_test/a_b_c_'trg'_errors.[extension]
166    * If the input file extension is tsv, errors_file contains the following:
167    * Column 1: ID of the request provided in the input, if it's not
168    * provided in the input, then the input row number is used (0-based).
169    * Column 2: source sentence.
170    * Column 3: Error detail for the translation. Could be empty.
171    * Column 4 (only present if a glossary is provided in the request):
172    * Error when applying the glossary.
173    * If the input file extension is txt or html, glossary_error_file will be
174    * generated that contains error details. glossary_error_file has format of
175    * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
176    * </pre>
177    *
178    * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
179    *
180    * @return Whether the gcsDestination field is set.
181    */
182   @java.lang.Override
hasGcsDestination()183   public boolean hasGcsDestination() {
184     return destinationCase_ == 1;
185   }
186   /**
187    *
188    *
189    * <pre>
190    * Google Cloud Storage destination for output content.
191    * For every single input file (for example, gs://a/b/c.[extension]), we
192    * generate at most 2 * n output files. (n is the # of target_language_codes
193    * in the BatchTranslateTextRequest).
194    * Output files (tsv) generated are compliant with RFC 4180 except that
195    * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
196    * change record delimiters.
197    * While the input files are being processed, we write/update an index file
198    * 'index.csv'  under 'output_uri_prefix' (for example,
199    * gs://translation-test/index.csv) The index file is generated/updated as
200    * new files are being translated. The format is:
201    * input_file,target_language_code,translations_file,errors_file,
202    * glossary_translations_file,glossary_errors_file
203    * input_file is one file we matched using gcs_source.input_uri.
204    * target_language_code is provided in the request.
205    * translations_file contains the translations. (details provided below)
206    * errors_file contains the errors during processing of the file. (details
207    * below). Both translations_file and errors_file could be empty
208    * strings if we have no content to output.
209    * glossary_translations_file and glossary_errors_file are always empty
210    * strings if the input_file is tsv. They could also be empty if we have no
211    * content to output.
212    * Once a row is present in index.csv, the input/output matching never
213    * changes. Callers should also expect all the content in input_file are
214    * processed and ready to be consumed (that is, no partial output file is
215    * written).
216    * Since index.csv will be keeping updated during the process, please make
217    * sure there is no custom retention policy applied on the output bucket
218    * that may avoid file updating.
219    * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
220    * The format of translations_file (for target language code 'trg') is:
221    * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
222    * If the input file extension is tsv, the output has the following
223    * columns:
224    * Column 1: ID of the request provided in the input, if it's not
225    * provided in the input, then the input row number is used (0-based).
226    * Column 2: source sentence.
227    * Column 3: translation without applying a glossary. Empty string if there
228    * is an error.
229    * Column 4 (only present if a glossary is provided in the request):
230    * translation after applying the glossary. Empty string if there is an
231    * error applying the glossary. Could be same string as column 3 if there is
232    * no glossary applied.
233    * If input file extension is a txt or html, the translation is directly
234    * written to the output file. If glossary is requested, a separate
235    * glossary_translations_file has format of
236    * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
237    * The format of errors file (for target language code 'trg') is:
238    * gs://translation_test/a_b_c_'trg'_errors.[extension]
239    * If the input file extension is tsv, errors_file contains the following:
240    * Column 1: ID of the request provided in the input, if it's not
241    * provided in the input, then the input row number is used (0-based).
242    * Column 2: source sentence.
243    * Column 3: Error detail for the translation. Could be empty.
244    * Column 4 (only present if a glossary is provided in the request):
245    * Error when applying the glossary.
246    * If the input file extension is txt or html, glossary_error_file will be
247    * generated that contains error details. glossary_error_file has format of
248    * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
249    * </pre>
250    *
251    * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
252    *
253    * @return The gcsDestination.
254    */
255   @java.lang.Override
getGcsDestination()256   public com.google.cloud.translate.v3.GcsDestination getGcsDestination() {
257     if (destinationCase_ == 1) {
258       return (com.google.cloud.translate.v3.GcsDestination) destination_;
259     }
260     return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
261   }
262   /**
263    *
264    *
265    * <pre>
266    * Google Cloud Storage destination for output content.
267    * For every single input file (for example, gs://a/b/c.[extension]), we
268    * generate at most 2 * n output files. (n is the # of target_language_codes
269    * in the BatchTranslateTextRequest).
270    * Output files (tsv) generated are compliant with RFC 4180 except that
271    * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
272    * change record delimiters.
273    * While the input files are being processed, we write/update an index file
274    * 'index.csv'  under 'output_uri_prefix' (for example,
275    * gs://translation-test/index.csv) The index file is generated/updated as
276    * new files are being translated. The format is:
277    * input_file,target_language_code,translations_file,errors_file,
278    * glossary_translations_file,glossary_errors_file
279    * input_file is one file we matched using gcs_source.input_uri.
280    * target_language_code is provided in the request.
281    * translations_file contains the translations. (details provided below)
282    * errors_file contains the errors during processing of the file. (details
283    * below). Both translations_file and errors_file could be empty
284    * strings if we have no content to output.
285    * glossary_translations_file and glossary_errors_file are always empty
286    * strings if the input_file is tsv. They could also be empty if we have no
287    * content to output.
288    * Once a row is present in index.csv, the input/output matching never
289    * changes. Callers should also expect all the content in input_file are
290    * processed and ready to be consumed (that is, no partial output file is
291    * written).
292    * Since index.csv will be keeping updated during the process, please make
293    * sure there is no custom retention policy applied on the output bucket
294    * that may avoid file updating.
295    * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
296    * The format of translations_file (for target language code 'trg') is:
297    * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
298    * If the input file extension is tsv, the output has the following
299    * columns:
300    * Column 1: ID of the request provided in the input, if it's not
301    * provided in the input, then the input row number is used (0-based).
302    * Column 2: source sentence.
303    * Column 3: translation without applying a glossary. Empty string if there
304    * is an error.
305    * Column 4 (only present if a glossary is provided in the request):
306    * translation after applying the glossary. Empty string if there is an
307    * error applying the glossary. Could be same string as column 3 if there is
308    * no glossary applied.
309    * If input file extension is a txt or html, the translation is directly
310    * written to the output file. If glossary is requested, a separate
311    * glossary_translations_file has format of
312    * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
313    * The format of errors file (for target language code 'trg') is:
314    * gs://translation_test/a_b_c_'trg'_errors.[extension]
315    * If the input file extension is tsv, errors_file contains the following:
316    * Column 1: ID of the request provided in the input, if it's not
317    * provided in the input, then the input row number is used (0-based).
318    * Column 2: source sentence.
319    * Column 3: Error detail for the translation. Could be empty.
320    * Column 4 (only present if a glossary is provided in the request):
321    * Error when applying the glossary.
322    * If the input file extension is txt or html, glossary_error_file will be
323    * generated that contains error details. glossary_error_file has format of
324    * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
325    * </pre>
326    *
327    * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
328    */
329   @java.lang.Override
getGcsDestinationOrBuilder()330   public com.google.cloud.translate.v3.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
331     if (destinationCase_ == 1) {
332       return (com.google.cloud.translate.v3.GcsDestination) destination_;
333     }
334     return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
335   }
336 
337   private byte memoizedIsInitialized = -1;
338 
339   @java.lang.Override
isInitialized()340   public final boolean isInitialized() {
341     byte isInitialized = memoizedIsInitialized;
342     if (isInitialized == 1) return true;
343     if (isInitialized == 0) return false;
344 
345     memoizedIsInitialized = 1;
346     return true;
347   }
348 
349   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)350   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
351     if (destinationCase_ == 1) {
352       output.writeMessage(1, (com.google.cloud.translate.v3.GcsDestination) destination_);
353     }
354     getUnknownFields().writeTo(output);
355   }
356 
357   @java.lang.Override
getSerializedSize()358   public int getSerializedSize() {
359     int size = memoizedSize;
360     if (size != -1) return size;
361 
362     size = 0;
363     if (destinationCase_ == 1) {
364       size +=
365           com.google.protobuf.CodedOutputStream.computeMessageSize(
366               1, (com.google.cloud.translate.v3.GcsDestination) destination_);
367     }
368     size += getUnknownFields().getSerializedSize();
369     memoizedSize = size;
370     return size;
371   }
372 
373   @java.lang.Override
equals(final java.lang.Object obj)374   public boolean equals(final java.lang.Object obj) {
375     if (obj == this) {
376       return true;
377     }
378     if (!(obj instanceof com.google.cloud.translate.v3.OutputConfig)) {
379       return super.equals(obj);
380     }
381     com.google.cloud.translate.v3.OutputConfig other =
382         (com.google.cloud.translate.v3.OutputConfig) obj;
383 
384     if (!getDestinationCase().equals(other.getDestinationCase())) return false;
385     switch (destinationCase_) {
386       case 1:
387         if (!getGcsDestination().equals(other.getGcsDestination())) return false;
388         break;
389       case 0:
390       default:
391     }
392     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
393     return true;
394   }
395 
396   @java.lang.Override
hashCode()397   public int hashCode() {
398     if (memoizedHashCode != 0) {
399       return memoizedHashCode;
400     }
401     int hash = 41;
402     hash = (19 * hash) + getDescriptor().hashCode();
403     switch (destinationCase_) {
404       case 1:
405         hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER;
406         hash = (53 * hash) + getGcsDestination().hashCode();
407         break;
408       case 0:
409       default:
410     }
411     hash = (29 * hash) + getUnknownFields().hashCode();
412     memoizedHashCode = hash;
413     return hash;
414   }
415 
parseFrom(java.nio.ByteBuffer data)416   public static com.google.cloud.translate.v3.OutputConfig parseFrom(java.nio.ByteBuffer data)
417       throws com.google.protobuf.InvalidProtocolBufferException {
418     return PARSER.parseFrom(data);
419   }
420 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)421   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
422       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
423       throws com.google.protobuf.InvalidProtocolBufferException {
424     return PARSER.parseFrom(data, extensionRegistry);
425   }
426 
parseFrom( com.google.protobuf.ByteString data)427   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
428       com.google.protobuf.ByteString data)
429       throws com.google.protobuf.InvalidProtocolBufferException {
430     return PARSER.parseFrom(data);
431   }
432 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)433   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
434       com.google.protobuf.ByteString data,
435       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
436       throws com.google.protobuf.InvalidProtocolBufferException {
437     return PARSER.parseFrom(data, extensionRegistry);
438   }
439 
parseFrom(byte[] data)440   public static com.google.cloud.translate.v3.OutputConfig parseFrom(byte[] data)
441       throws com.google.protobuf.InvalidProtocolBufferException {
442     return PARSER.parseFrom(data);
443   }
444 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)445   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
446       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
447       throws com.google.protobuf.InvalidProtocolBufferException {
448     return PARSER.parseFrom(data, extensionRegistry);
449   }
450 
parseFrom(java.io.InputStream input)451   public static com.google.cloud.translate.v3.OutputConfig parseFrom(java.io.InputStream input)
452       throws java.io.IOException {
453     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
454   }
455 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)456   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
457       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
458       throws java.io.IOException {
459     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
460         PARSER, input, extensionRegistry);
461   }
462 
parseDelimitedFrom( java.io.InputStream input)463   public static com.google.cloud.translate.v3.OutputConfig parseDelimitedFrom(
464       java.io.InputStream input) throws java.io.IOException {
465     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
466   }
467 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)468   public static com.google.cloud.translate.v3.OutputConfig parseDelimitedFrom(
469       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
470       throws java.io.IOException {
471     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
472         PARSER, input, extensionRegistry);
473   }
474 
parseFrom( com.google.protobuf.CodedInputStream input)475   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
476       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
477     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
478   }
479 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)480   public static com.google.cloud.translate.v3.OutputConfig parseFrom(
481       com.google.protobuf.CodedInputStream input,
482       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
483       throws java.io.IOException {
484     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
485         PARSER, input, extensionRegistry);
486   }
487 
488   @java.lang.Override
newBuilderForType()489   public Builder newBuilderForType() {
490     return newBuilder();
491   }
492 
newBuilder()493   public static Builder newBuilder() {
494     return DEFAULT_INSTANCE.toBuilder();
495   }
496 
newBuilder(com.google.cloud.translate.v3.OutputConfig prototype)497   public static Builder newBuilder(com.google.cloud.translate.v3.OutputConfig prototype) {
498     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
499   }
500 
501   @java.lang.Override
toBuilder()502   public Builder toBuilder() {
503     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
504   }
505 
506   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)507   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
508     Builder builder = new Builder(parent);
509     return builder;
510   }
511   /**
512    *
513    *
514    * <pre>
515    * Output configuration for BatchTranslateText request.
516    * </pre>
517    *
518    * Protobuf type {@code google.cloud.translation.v3.OutputConfig}
519    */
520   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
521       implements
522       // @@protoc_insertion_point(builder_implements:google.cloud.translation.v3.OutputConfig)
523       com.google.cloud.translate.v3.OutputConfigOrBuilder {
getDescriptor()524     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
525       return com.google.cloud.translate.v3.TranslationServiceProto
526           .internal_static_google_cloud_translation_v3_OutputConfig_descriptor;
527     }
528 
529     @java.lang.Override
530     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()531         internalGetFieldAccessorTable() {
532       return com.google.cloud.translate.v3.TranslationServiceProto
533           .internal_static_google_cloud_translation_v3_OutputConfig_fieldAccessorTable
534           .ensureFieldAccessorsInitialized(
535               com.google.cloud.translate.v3.OutputConfig.class,
536               com.google.cloud.translate.v3.OutputConfig.Builder.class);
537     }
538 
539     // Construct using com.google.cloud.translate.v3.OutputConfig.newBuilder()
Builder()540     private Builder() {}
541 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)542     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
543       super(parent);
544     }
545 
546     @java.lang.Override
clear()547     public Builder clear() {
548       super.clear();
549       bitField0_ = 0;
550       if (gcsDestinationBuilder_ != null) {
551         gcsDestinationBuilder_.clear();
552       }
553       destinationCase_ = 0;
554       destination_ = null;
555       return this;
556     }
557 
558     @java.lang.Override
getDescriptorForType()559     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
560       return com.google.cloud.translate.v3.TranslationServiceProto
561           .internal_static_google_cloud_translation_v3_OutputConfig_descriptor;
562     }
563 
564     @java.lang.Override
getDefaultInstanceForType()565     public com.google.cloud.translate.v3.OutputConfig getDefaultInstanceForType() {
566       return com.google.cloud.translate.v3.OutputConfig.getDefaultInstance();
567     }
568 
569     @java.lang.Override
build()570     public com.google.cloud.translate.v3.OutputConfig build() {
571       com.google.cloud.translate.v3.OutputConfig result = buildPartial();
572       if (!result.isInitialized()) {
573         throw newUninitializedMessageException(result);
574       }
575       return result;
576     }
577 
578     @java.lang.Override
buildPartial()579     public com.google.cloud.translate.v3.OutputConfig buildPartial() {
580       com.google.cloud.translate.v3.OutputConfig result =
581           new com.google.cloud.translate.v3.OutputConfig(this);
582       if (bitField0_ != 0) {
583         buildPartial0(result);
584       }
585       buildPartialOneofs(result);
586       onBuilt();
587       return result;
588     }
589 
buildPartial0(com.google.cloud.translate.v3.OutputConfig result)590     private void buildPartial0(com.google.cloud.translate.v3.OutputConfig result) {
591       int from_bitField0_ = bitField0_;
592     }
593 
buildPartialOneofs(com.google.cloud.translate.v3.OutputConfig result)594     private void buildPartialOneofs(com.google.cloud.translate.v3.OutputConfig result) {
595       result.destinationCase_ = destinationCase_;
596       result.destination_ = this.destination_;
597       if (destinationCase_ == 1 && gcsDestinationBuilder_ != null) {
598         result.destination_ = gcsDestinationBuilder_.build();
599       }
600     }
601 
602     @java.lang.Override
clone()603     public Builder clone() {
604       return super.clone();
605     }
606 
607     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)608     public Builder setField(
609         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
610       return super.setField(field, value);
611     }
612 
613     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)614     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
615       return super.clearField(field);
616     }
617 
618     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)619     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
620       return super.clearOneof(oneof);
621     }
622 
623     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)624     public Builder setRepeatedField(
625         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
626       return super.setRepeatedField(field, index, value);
627     }
628 
629     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)630     public Builder addRepeatedField(
631         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
632       return super.addRepeatedField(field, value);
633     }
634 
635     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)636     public Builder mergeFrom(com.google.protobuf.Message other) {
637       if (other instanceof com.google.cloud.translate.v3.OutputConfig) {
638         return mergeFrom((com.google.cloud.translate.v3.OutputConfig) other);
639       } else {
640         super.mergeFrom(other);
641         return this;
642       }
643     }
644 
mergeFrom(com.google.cloud.translate.v3.OutputConfig other)645     public Builder mergeFrom(com.google.cloud.translate.v3.OutputConfig other) {
646       if (other == com.google.cloud.translate.v3.OutputConfig.getDefaultInstance()) return this;
647       switch (other.getDestinationCase()) {
648         case GCS_DESTINATION:
649           {
650             mergeGcsDestination(other.getGcsDestination());
651             break;
652           }
653         case DESTINATION_NOT_SET:
654           {
655             break;
656           }
657       }
658       this.mergeUnknownFields(other.getUnknownFields());
659       onChanged();
660       return this;
661     }
662 
663     @java.lang.Override
isInitialized()664     public final boolean isInitialized() {
665       return true;
666     }
667 
668     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)669     public Builder mergeFrom(
670         com.google.protobuf.CodedInputStream input,
671         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
672         throws java.io.IOException {
673       if (extensionRegistry == null) {
674         throw new java.lang.NullPointerException();
675       }
676       try {
677         boolean done = false;
678         while (!done) {
679           int tag = input.readTag();
680           switch (tag) {
681             case 0:
682               done = true;
683               break;
684             case 10:
685               {
686                 input.readMessage(getGcsDestinationFieldBuilder().getBuilder(), extensionRegistry);
687                 destinationCase_ = 1;
688                 break;
689               } // case 10
690             default:
691               {
692                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
693                   done = true; // was an endgroup tag
694                 }
695                 break;
696               } // default:
697           } // switch (tag)
698         } // while (!done)
699       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
700         throw e.unwrapIOException();
701       } finally {
702         onChanged();
703       } // finally
704       return this;
705     }
706 
707     private int destinationCase_ = 0;
708     private java.lang.Object destination_;
709 
getDestinationCase()710     public DestinationCase getDestinationCase() {
711       return DestinationCase.forNumber(destinationCase_);
712     }
713 
clearDestination()714     public Builder clearDestination() {
715       destinationCase_ = 0;
716       destination_ = null;
717       onChanged();
718       return this;
719     }
720 
721     private int bitField0_;
722 
723     private com.google.protobuf.SingleFieldBuilderV3<
724             com.google.cloud.translate.v3.GcsDestination,
725             com.google.cloud.translate.v3.GcsDestination.Builder,
726             com.google.cloud.translate.v3.GcsDestinationOrBuilder>
727         gcsDestinationBuilder_;
728     /**
729      *
730      *
731      * <pre>
732      * Google Cloud Storage destination for output content.
733      * For every single input file (for example, gs://a/b/c.[extension]), we
734      * generate at most 2 * n output files. (n is the # of target_language_codes
735      * in the BatchTranslateTextRequest).
736      * Output files (tsv) generated are compliant with RFC 4180 except that
737      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
738      * change record delimiters.
739      * While the input files are being processed, we write/update an index file
740      * 'index.csv'  under 'output_uri_prefix' (for example,
741      * gs://translation-test/index.csv) The index file is generated/updated as
742      * new files are being translated. The format is:
743      * input_file,target_language_code,translations_file,errors_file,
744      * glossary_translations_file,glossary_errors_file
745      * input_file is one file we matched using gcs_source.input_uri.
746      * target_language_code is provided in the request.
747      * translations_file contains the translations. (details provided below)
748      * errors_file contains the errors during processing of the file. (details
749      * below). Both translations_file and errors_file could be empty
750      * strings if we have no content to output.
751      * glossary_translations_file and glossary_errors_file are always empty
752      * strings if the input_file is tsv. They could also be empty if we have no
753      * content to output.
754      * Once a row is present in index.csv, the input/output matching never
755      * changes. Callers should also expect all the content in input_file are
756      * processed and ready to be consumed (that is, no partial output file is
757      * written).
758      * Since index.csv will be keeping updated during the process, please make
759      * sure there is no custom retention policy applied on the output bucket
760      * that may avoid file updating.
761      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
762      * The format of translations_file (for target language code 'trg') is:
763      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
764      * If the input file extension is tsv, the output has the following
765      * columns:
766      * Column 1: ID of the request provided in the input, if it's not
767      * provided in the input, then the input row number is used (0-based).
768      * Column 2: source sentence.
769      * Column 3: translation without applying a glossary. Empty string if there
770      * is an error.
771      * Column 4 (only present if a glossary is provided in the request):
772      * translation after applying the glossary. Empty string if there is an
773      * error applying the glossary. Could be same string as column 3 if there is
774      * no glossary applied.
775      * If input file extension is a txt or html, the translation is directly
776      * written to the output file. If glossary is requested, a separate
777      * glossary_translations_file has format of
778      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
779      * The format of errors file (for target language code 'trg') is:
780      * gs://translation_test/a_b_c_'trg'_errors.[extension]
781      * If the input file extension is tsv, errors_file contains the following:
782      * Column 1: ID of the request provided in the input, if it's not
783      * provided in the input, then the input row number is used (0-based).
784      * Column 2: source sentence.
785      * Column 3: Error detail for the translation. Could be empty.
786      * Column 4 (only present if a glossary is provided in the request):
787      * Error when applying the glossary.
788      * If the input file extension is txt or html, glossary_error_file will be
789      * generated that contains error details. glossary_error_file has format of
790      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
791      * </pre>
792      *
793      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
794      *
795      * @return Whether the gcsDestination field is set.
796      */
797     @java.lang.Override
hasGcsDestination()798     public boolean hasGcsDestination() {
799       return destinationCase_ == 1;
800     }
801     /**
802      *
803      *
804      * <pre>
805      * Google Cloud Storage destination for output content.
806      * For every single input file (for example, gs://a/b/c.[extension]), we
807      * generate at most 2 * n output files. (n is the # of target_language_codes
808      * in the BatchTranslateTextRequest).
809      * Output files (tsv) generated are compliant with RFC 4180 except that
810      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
811      * change record delimiters.
812      * While the input files are being processed, we write/update an index file
813      * 'index.csv'  under 'output_uri_prefix' (for example,
814      * gs://translation-test/index.csv) The index file is generated/updated as
815      * new files are being translated. The format is:
816      * input_file,target_language_code,translations_file,errors_file,
817      * glossary_translations_file,glossary_errors_file
818      * input_file is one file we matched using gcs_source.input_uri.
819      * target_language_code is provided in the request.
820      * translations_file contains the translations. (details provided below)
821      * errors_file contains the errors during processing of the file. (details
822      * below). Both translations_file and errors_file could be empty
823      * strings if we have no content to output.
824      * glossary_translations_file and glossary_errors_file are always empty
825      * strings if the input_file is tsv. They could also be empty if we have no
826      * content to output.
827      * Once a row is present in index.csv, the input/output matching never
828      * changes. Callers should also expect all the content in input_file are
829      * processed and ready to be consumed (that is, no partial output file is
830      * written).
831      * Since index.csv will be keeping updated during the process, please make
832      * sure there is no custom retention policy applied on the output bucket
833      * that may avoid file updating.
834      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
835      * The format of translations_file (for target language code 'trg') is:
836      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
837      * If the input file extension is tsv, the output has the following
838      * columns:
839      * Column 1: ID of the request provided in the input, if it's not
840      * provided in the input, then the input row number is used (0-based).
841      * Column 2: source sentence.
842      * Column 3: translation without applying a glossary. Empty string if there
843      * is an error.
844      * Column 4 (only present if a glossary is provided in the request):
845      * translation after applying the glossary. Empty string if there is an
846      * error applying the glossary. Could be same string as column 3 if there is
847      * no glossary applied.
848      * If input file extension is a txt or html, the translation is directly
849      * written to the output file. If glossary is requested, a separate
850      * glossary_translations_file has format of
851      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
852      * The format of errors file (for target language code 'trg') is:
853      * gs://translation_test/a_b_c_'trg'_errors.[extension]
854      * If the input file extension is tsv, errors_file contains the following:
855      * Column 1: ID of the request provided in the input, if it's not
856      * provided in the input, then the input row number is used (0-based).
857      * Column 2: source sentence.
858      * Column 3: Error detail for the translation. Could be empty.
859      * Column 4 (only present if a glossary is provided in the request):
860      * Error when applying the glossary.
861      * If the input file extension is txt or html, glossary_error_file will be
862      * generated that contains error details. glossary_error_file has format of
863      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
864      * </pre>
865      *
866      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
867      *
868      * @return The gcsDestination.
869      */
870     @java.lang.Override
getGcsDestination()871     public com.google.cloud.translate.v3.GcsDestination getGcsDestination() {
872       if (gcsDestinationBuilder_ == null) {
873         if (destinationCase_ == 1) {
874           return (com.google.cloud.translate.v3.GcsDestination) destination_;
875         }
876         return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
877       } else {
878         if (destinationCase_ == 1) {
879           return gcsDestinationBuilder_.getMessage();
880         }
881         return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
882       }
883     }
884     /**
885      *
886      *
887      * <pre>
888      * Google Cloud Storage destination for output content.
889      * For every single input file (for example, gs://a/b/c.[extension]), we
890      * generate at most 2 * n output files. (n is the # of target_language_codes
891      * in the BatchTranslateTextRequest).
892      * Output files (tsv) generated are compliant with RFC 4180 except that
893      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
894      * change record delimiters.
895      * While the input files are being processed, we write/update an index file
896      * 'index.csv'  under 'output_uri_prefix' (for example,
897      * gs://translation-test/index.csv) The index file is generated/updated as
898      * new files are being translated. The format is:
899      * input_file,target_language_code,translations_file,errors_file,
900      * glossary_translations_file,glossary_errors_file
901      * input_file is one file we matched using gcs_source.input_uri.
902      * target_language_code is provided in the request.
903      * translations_file contains the translations. (details provided below)
904      * errors_file contains the errors during processing of the file. (details
905      * below). Both translations_file and errors_file could be empty
906      * strings if we have no content to output.
907      * glossary_translations_file and glossary_errors_file are always empty
908      * strings if the input_file is tsv. They could also be empty if we have no
909      * content to output.
910      * Once a row is present in index.csv, the input/output matching never
911      * changes. Callers should also expect all the content in input_file are
912      * processed and ready to be consumed (that is, no partial output file is
913      * written).
914      * Since index.csv will be keeping updated during the process, please make
915      * sure there is no custom retention policy applied on the output bucket
916      * that may avoid file updating.
917      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
918      * The format of translations_file (for target language code 'trg') is:
919      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
920      * If the input file extension is tsv, the output has the following
921      * columns:
922      * Column 1: ID of the request provided in the input, if it's not
923      * provided in the input, then the input row number is used (0-based).
924      * Column 2: source sentence.
925      * Column 3: translation without applying a glossary. Empty string if there
926      * is an error.
927      * Column 4 (only present if a glossary is provided in the request):
928      * translation after applying the glossary. Empty string if there is an
929      * error applying the glossary. Could be same string as column 3 if there is
930      * no glossary applied.
931      * If input file extension is a txt or html, the translation is directly
932      * written to the output file. If glossary is requested, a separate
933      * glossary_translations_file has format of
934      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
935      * The format of errors file (for target language code 'trg') is:
936      * gs://translation_test/a_b_c_'trg'_errors.[extension]
937      * If the input file extension is tsv, errors_file contains the following:
938      * Column 1: ID of the request provided in the input, if it's not
939      * provided in the input, then the input row number is used (0-based).
940      * Column 2: source sentence.
941      * Column 3: Error detail for the translation. Could be empty.
942      * Column 4 (only present if a glossary is provided in the request):
943      * Error when applying the glossary.
944      * If the input file extension is txt or html, glossary_error_file will be
945      * generated that contains error details. glossary_error_file has format of
946      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
947      * </pre>
948      *
949      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
950      */
setGcsDestination(com.google.cloud.translate.v3.GcsDestination value)951     public Builder setGcsDestination(com.google.cloud.translate.v3.GcsDestination value) {
952       if (gcsDestinationBuilder_ == null) {
953         if (value == null) {
954           throw new NullPointerException();
955         }
956         destination_ = value;
957         onChanged();
958       } else {
959         gcsDestinationBuilder_.setMessage(value);
960       }
961       destinationCase_ = 1;
962       return this;
963     }
964     /**
965      *
966      *
967      * <pre>
968      * Google Cloud Storage destination for output content.
969      * For every single input file (for example, gs://a/b/c.[extension]), we
970      * generate at most 2 * n output files. (n is the # of target_language_codes
971      * in the BatchTranslateTextRequest).
972      * Output files (tsv) generated are compliant with RFC 4180 except that
973      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
974      * change record delimiters.
975      * While the input files are being processed, we write/update an index file
976      * 'index.csv'  under 'output_uri_prefix' (for example,
977      * gs://translation-test/index.csv) The index file is generated/updated as
978      * new files are being translated. The format is:
979      * input_file,target_language_code,translations_file,errors_file,
980      * glossary_translations_file,glossary_errors_file
981      * input_file is one file we matched using gcs_source.input_uri.
982      * target_language_code is provided in the request.
983      * translations_file contains the translations. (details provided below)
984      * errors_file contains the errors during processing of the file. (details
985      * below). Both translations_file and errors_file could be empty
986      * strings if we have no content to output.
987      * glossary_translations_file and glossary_errors_file are always empty
988      * strings if the input_file is tsv. They could also be empty if we have no
989      * content to output.
990      * Once a row is present in index.csv, the input/output matching never
991      * changes. Callers should also expect all the content in input_file are
992      * processed and ready to be consumed (that is, no partial output file is
993      * written).
994      * Since index.csv will be keeping updated during the process, please make
995      * sure there is no custom retention policy applied on the output bucket
996      * that may avoid file updating.
997      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
998      * The format of translations_file (for target language code 'trg') is:
999      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1000      * If the input file extension is tsv, the output has the following
1001      * columns:
1002      * Column 1: ID of the request provided in the input, if it's not
1003      * provided in the input, then the input row number is used (0-based).
1004      * Column 2: source sentence.
1005      * Column 3: translation without applying a glossary. Empty string if there
1006      * is an error.
1007      * Column 4 (only present if a glossary is provided in the request):
1008      * translation after applying the glossary. Empty string if there is an
1009      * error applying the glossary. Could be same string as column 3 if there is
1010      * no glossary applied.
1011      * If input file extension is a txt or html, the translation is directly
1012      * written to the output file. If glossary is requested, a separate
1013      * glossary_translations_file has format of
1014      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1015      * The format of errors file (for target language code 'trg') is:
1016      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1017      * If the input file extension is tsv, errors_file contains the following:
1018      * Column 1: ID of the request provided in the input, if it's not
1019      * provided in the input, then the input row number is used (0-based).
1020      * Column 2: source sentence.
1021      * Column 3: Error detail for the translation. Could be empty.
1022      * Column 4 (only present if a glossary is provided in the request):
1023      * Error when applying the glossary.
1024      * If the input file extension is txt or html, glossary_error_file will be
1025      * generated that contains error details. glossary_error_file has format of
1026      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1027      * </pre>
1028      *
1029      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1030      */
setGcsDestination( com.google.cloud.translate.v3.GcsDestination.Builder builderForValue)1031     public Builder setGcsDestination(
1032         com.google.cloud.translate.v3.GcsDestination.Builder builderForValue) {
1033       if (gcsDestinationBuilder_ == null) {
1034         destination_ = builderForValue.build();
1035         onChanged();
1036       } else {
1037         gcsDestinationBuilder_.setMessage(builderForValue.build());
1038       }
1039       destinationCase_ = 1;
1040       return this;
1041     }
1042     /**
1043      *
1044      *
1045      * <pre>
1046      * Google Cloud Storage destination for output content.
1047      * For every single input file (for example, gs://a/b/c.[extension]), we
1048      * generate at most 2 * n output files. (n is the # of target_language_codes
1049      * in the BatchTranslateTextRequest).
1050      * Output files (tsv) generated are compliant with RFC 4180 except that
1051      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
1052      * change record delimiters.
1053      * While the input files are being processed, we write/update an index file
1054      * 'index.csv'  under 'output_uri_prefix' (for example,
1055      * gs://translation-test/index.csv) The index file is generated/updated as
1056      * new files are being translated. The format is:
1057      * input_file,target_language_code,translations_file,errors_file,
1058      * glossary_translations_file,glossary_errors_file
1059      * input_file is one file we matched using gcs_source.input_uri.
1060      * target_language_code is provided in the request.
1061      * translations_file contains the translations. (details provided below)
1062      * errors_file contains the errors during processing of the file. (details
1063      * below). Both translations_file and errors_file could be empty
1064      * strings if we have no content to output.
1065      * glossary_translations_file and glossary_errors_file are always empty
1066      * strings if the input_file is tsv. They could also be empty if we have no
1067      * content to output.
1068      * Once a row is present in index.csv, the input/output matching never
1069      * changes. Callers should also expect all the content in input_file are
1070      * processed and ready to be consumed (that is, no partial output file is
1071      * written).
1072      * Since index.csv will be keeping updated during the process, please make
1073      * sure there is no custom retention policy applied on the output bucket
1074      * that may avoid file updating.
1075      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
1076      * The format of translations_file (for target language code 'trg') is:
1077      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1078      * If the input file extension is tsv, the output has the following
1079      * columns:
1080      * Column 1: ID of the request provided in the input, if it's not
1081      * provided in the input, then the input row number is used (0-based).
1082      * Column 2: source sentence.
1083      * Column 3: translation without applying a glossary. Empty string if there
1084      * is an error.
1085      * Column 4 (only present if a glossary is provided in the request):
1086      * translation after applying the glossary. Empty string if there is an
1087      * error applying the glossary. Could be same string as column 3 if there is
1088      * no glossary applied.
1089      * If input file extension is a txt or html, the translation is directly
1090      * written to the output file. If glossary is requested, a separate
1091      * glossary_translations_file has format of
1092      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1093      * The format of errors file (for target language code 'trg') is:
1094      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1095      * If the input file extension is tsv, errors_file contains the following:
1096      * Column 1: ID of the request provided in the input, if it's not
1097      * provided in the input, then the input row number is used (0-based).
1098      * Column 2: source sentence.
1099      * Column 3: Error detail for the translation. Could be empty.
1100      * Column 4 (only present if a glossary is provided in the request):
1101      * Error when applying the glossary.
1102      * If the input file extension is txt or html, glossary_error_file will be
1103      * generated that contains error details. glossary_error_file has format of
1104      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1105      * </pre>
1106      *
1107      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1108      */
mergeGcsDestination(com.google.cloud.translate.v3.GcsDestination value)1109     public Builder mergeGcsDestination(com.google.cloud.translate.v3.GcsDestination value) {
1110       if (gcsDestinationBuilder_ == null) {
1111         if (destinationCase_ == 1
1112             && destination_ != com.google.cloud.translate.v3.GcsDestination.getDefaultInstance()) {
1113           destination_ =
1114               com.google.cloud.translate.v3.GcsDestination.newBuilder(
1115                       (com.google.cloud.translate.v3.GcsDestination) destination_)
1116                   .mergeFrom(value)
1117                   .buildPartial();
1118         } else {
1119           destination_ = value;
1120         }
1121         onChanged();
1122       } else {
1123         if (destinationCase_ == 1) {
1124           gcsDestinationBuilder_.mergeFrom(value);
1125         } else {
1126           gcsDestinationBuilder_.setMessage(value);
1127         }
1128       }
1129       destinationCase_ = 1;
1130       return this;
1131     }
1132     /**
1133      *
1134      *
1135      * <pre>
1136      * Google Cloud Storage destination for output content.
1137      * For every single input file (for example, gs://a/b/c.[extension]), we
1138      * generate at most 2 * n output files. (n is the # of target_language_codes
1139      * in the BatchTranslateTextRequest).
1140      * Output files (tsv) generated are compliant with RFC 4180 except that
1141      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
1142      * change record delimiters.
1143      * While the input files are being processed, we write/update an index file
1144      * 'index.csv'  under 'output_uri_prefix' (for example,
1145      * gs://translation-test/index.csv) The index file is generated/updated as
1146      * new files are being translated. The format is:
1147      * input_file,target_language_code,translations_file,errors_file,
1148      * glossary_translations_file,glossary_errors_file
1149      * input_file is one file we matched using gcs_source.input_uri.
1150      * target_language_code is provided in the request.
1151      * translations_file contains the translations. (details provided below)
1152      * errors_file contains the errors during processing of the file. (details
1153      * below). Both translations_file and errors_file could be empty
1154      * strings if we have no content to output.
1155      * glossary_translations_file and glossary_errors_file are always empty
1156      * strings if the input_file is tsv. They could also be empty if we have no
1157      * content to output.
1158      * Once a row is present in index.csv, the input/output matching never
1159      * changes. Callers should also expect all the content in input_file are
1160      * processed and ready to be consumed (that is, no partial output file is
1161      * written).
1162      * Since index.csv will be keeping updated during the process, please make
1163      * sure there is no custom retention policy applied on the output bucket
1164      * that may avoid file updating.
1165      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
1166      * The format of translations_file (for target language code 'trg') is:
1167      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1168      * If the input file extension is tsv, the output has the following
1169      * columns:
1170      * Column 1: ID of the request provided in the input, if it's not
1171      * provided in the input, then the input row number is used (0-based).
1172      * Column 2: source sentence.
1173      * Column 3: translation without applying a glossary. Empty string if there
1174      * is an error.
1175      * Column 4 (only present if a glossary is provided in the request):
1176      * translation after applying the glossary. Empty string if there is an
1177      * error applying the glossary. Could be same string as column 3 if there is
1178      * no glossary applied.
1179      * If input file extension is a txt or html, the translation is directly
1180      * written to the output file. If glossary is requested, a separate
1181      * glossary_translations_file has format of
1182      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1183      * The format of errors file (for target language code 'trg') is:
1184      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1185      * If the input file extension is tsv, errors_file contains the following:
1186      * Column 1: ID of the request provided in the input, if it's not
1187      * provided in the input, then the input row number is used (0-based).
1188      * Column 2: source sentence.
1189      * Column 3: Error detail for the translation. Could be empty.
1190      * Column 4 (only present if a glossary is provided in the request):
1191      * Error when applying the glossary.
1192      * If the input file extension is txt or html, glossary_error_file will be
1193      * generated that contains error details. glossary_error_file has format of
1194      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1195      * </pre>
1196      *
1197      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1198      */
clearGcsDestination()1199     public Builder clearGcsDestination() {
1200       if (gcsDestinationBuilder_ == null) {
1201         if (destinationCase_ == 1) {
1202           destinationCase_ = 0;
1203           destination_ = null;
1204           onChanged();
1205         }
1206       } else {
1207         if (destinationCase_ == 1) {
1208           destinationCase_ = 0;
1209           destination_ = null;
1210         }
1211         gcsDestinationBuilder_.clear();
1212       }
1213       return this;
1214     }
1215     /**
1216      *
1217      *
1218      * <pre>
1219      * Google Cloud Storage destination for output content.
1220      * For every single input file (for example, gs://a/b/c.[extension]), we
1221      * generate at most 2 * n output files. (n is the # of target_language_codes
1222      * in the BatchTranslateTextRequest).
1223      * Output files (tsv) generated are compliant with RFC 4180 except that
1224      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
1225      * change record delimiters.
1226      * While the input files are being processed, we write/update an index file
1227      * 'index.csv'  under 'output_uri_prefix' (for example,
1228      * gs://translation-test/index.csv) The index file is generated/updated as
1229      * new files are being translated. The format is:
1230      * input_file,target_language_code,translations_file,errors_file,
1231      * glossary_translations_file,glossary_errors_file
1232      * input_file is one file we matched using gcs_source.input_uri.
1233      * target_language_code is provided in the request.
1234      * translations_file contains the translations. (details provided below)
1235      * errors_file contains the errors during processing of the file. (details
1236      * below). Both translations_file and errors_file could be empty
1237      * strings if we have no content to output.
1238      * glossary_translations_file and glossary_errors_file are always empty
1239      * strings if the input_file is tsv. They could also be empty if we have no
1240      * content to output.
1241      * Once a row is present in index.csv, the input/output matching never
1242      * changes. Callers should also expect all the content in input_file are
1243      * processed and ready to be consumed (that is, no partial output file is
1244      * written).
1245      * Since index.csv will be keeping updated during the process, please make
1246      * sure there is no custom retention policy applied on the output bucket
1247      * that may avoid file updating.
1248      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
1249      * The format of translations_file (for target language code 'trg') is:
1250      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1251      * If the input file extension is tsv, the output has the following
1252      * columns:
1253      * Column 1: ID of the request provided in the input, if it's not
1254      * provided in the input, then the input row number is used (0-based).
1255      * Column 2: source sentence.
1256      * Column 3: translation without applying a glossary. Empty string if there
1257      * is an error.
1258      * Column 4 (only present if a glossary is provided in the request):
1259      * translation after applying the glossary. Empty string if there is an
1260      * error applying the glossary. Could be same string as column 3 if there is
1261      * no glossary applied.
1262      * If input file extension is a txt or html, the translation is directly
1263      * written to the output file. If glossary is requested, a separate
1264      * glossary_translations_file has format of
1265      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1266      * The format of errors file (for target language code 'trg') is:
1267      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1268      * If the input file extension is tsv, errors_file contains the following:
1269      * Column 1: ID of the request provided in the input, if it's not
1270      * provided in the input, then the input row number is used (0-based).
1271      * Column 2: source sentence.
1272      * Column 3: Error detail for the translation. Could be empty.
1273      * Column 4 (only present if a glossary is provided in the request):
1274      * Error when applying the glossary.
1275      * If the input file extension is txt or html, glossary_error_file will be
1276      * generated that contains error details. glossary_error_file has format of
1277      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1278      * </pre>
1279      *
1280      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1281      */
getGcsDestinationBuilder()1282     public com.google.cloud.translate.v3.GcsDestination.Builder getGcsDestinationBuilder() {
1283       return getGcsDestinationFieldBuilder().getBuilder();
1284     }
1285     /**
1286      *
1287      *
1288      * <pre>
1289      * Google Cloud Storage destination for output content.
1290      * For every single input file (for example, gs://a/b/c.[extension]), we
1291      * generate at most 2 * n output files. (n is the # of target_language_codes
1292      * in the BatchTranslateTextRequest).
1293      * Output files (tsv) generated are compliant with RFC 4180 except that
1294      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
1295      * change record delimiters.
1296      * While the input files are being processed, we write/update an index file
1297      * 'index.csv'  under 'output_uri_prefix' (for example,
1298      * gs://translation-test/index.csv) The index file is generated/updated as
1299      * new files are being translated. The format is:
1300      * input_file,target_language_code,translations_file,errors_file,
1301      * glossary_translations_file,glossary_errors_file
1302      * input_file is one file we matched using gcs_source.input_uri.
1303      * target_language_code is provided in the request.
1304      * translations_file contains the translations. (details provided below)
1305      * errors_file contains the errors during processing of the file. (details
1306      * below). Both translations_file and errors_file could be empty
1307      * strings if we have no content to output.
1308      * glossary_translations_file and glossary_errors_file are always empty
1309      * strings if the input_file is tsv. They could also be empty if we have no
1310      * content to output.
1311      * Once a row is present in index.csv, the input/output matching never
1312      * changes. Callers should also expect all the content in input_file are
1313      * processed and ready to be consumed (that is, no partial output file is
1314      * written).
1315      * Since index.csv will be keeping updated during the process, please make
1316      * sure there is no custom retention policy applied on the output bucket
1317      * that may avoid file updating.
1318      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
1319      * The format of translations_file (for target language code 'trg') is:
1320      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1321      * If the input file extension is tsv, the output has the following
1322      * columns:
1323      * Column 1: ID of the request provided in the input, if it's not
1324      * provided in the input, then the input row number is used (0-based).
1325      * Column 2: source sentence.
1326      * Column 3: translation without applying a glossary. Empty string if there
1327      * is an error.
1328      * Column 4 (only present if a glossary is provided in the request):
1329      * translation after applying the glossary. Empty string if there is an
1330      * error applying the glossary. Could be same string as column 3 if there is
1331      * no glossary applied.
1332      * If input file extension is a txt or html, the translation is directly
1333      * written to the output file. If glossary is requested, a separate
1334      * glossary_translations_file has format of
1335      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1336      * The format of errors file (for target language code 'trg') is:
1337      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1338      * If the input file extension is tsv, errors_file contains the following:
1339      * Column 1: ID of the request provided in the input, if it's not
1340      * provided in the input, then the input row number is used (0-based).
1341      * Column 2: source sentence.
1342      * Column 3: Error detail for the translation. Could be empty.
1343      * Column 4 (only present if a glossary is provided in the request):
1344      * Error when applying the glossary.
1345      * If the input file extension is txt or html, glossary_error_file will be
1346      * generated that contains error details. glossary_error_file has format of
1347      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1348      * </pre>
1349      *
1350      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1351      */
1352     @java.lang.Override
getGcsDestinationOrBuilder()1353     public com.google.cloud.translate.v3.GcsDestinationOrBuilder getGcsDestinationOrBuilder() {
1354       if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) {
1355         return gcsDestinationBuilder_.getMessageOrBuilder();
1356       } else {
1357         if (destinationCase_ == 1) {
1358           return (com.google.cloud.translate.v3.GcsDestination) destination_;
1359         }
1360         return com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
1361       }
1362     }
1363     /**
1364      *
1365      *
1366      * <pre>
1367      * Google Cloud Storage destination for output content.
1368      * For every single input file (for example, gs://a/b/c.[extension]), we
1369      * generate at most 2 * n output files. (n is the # of target_language_codes
1370      * in the BatchTranslateTextRequest).
1371      * Output files (tsv) generated are compliant with RFC 4180 except that
1372      * record delimiters are '&#92;n' instead of '&#92;r&#92;n'. We don't provide any way to
1373      * change record delimiters.
1374      * While the input files are being processed, we write/update an index file
1375      * 'index.csv'  under 'output_uri_prefix' (for example,
1376      * gs://translation-test/index.csv) The index file is generated/updated as
1377      * new files are being translated. The format is:
1378      * input_file,target_language_code,translations_file,errors_file,
1379      * glossary_translations_file,glossary_errors_file
1380      * input_file is one file we matched using gcs_source.input_uri.
1381      * target_language_code is provided in the request.
1382      * translations_file contains the translations. (details provided below)
1383      * errors_file contains the errors during processing of the file. (details
1384      * below). Both translations_file and errors_file could be empty
1385      * strings if we have no content to output.
1386      * glossary_translations_file and glossary_errors_file are always empty
1387      * strings if the input_file is tsv. They could also be empty if we have no
1388      * content to output.
1389      * Once a row is present in index.csv, the input/output matching never
1390      * changes. Callers should also expect all the content in input_file are
1391      * processed and ready to be consumed (that is, no partial output file is
1392      * written).
1393      * Since index.csv will be keeping updated during the process, please make
1394      * sure there is no custom retention policy applied on the output bucket
1395      * that may avoid file updating.
1396      * (https://cloud.google.com/storage/docs/bucket-lock#retention-policy)
1397      * The format of translations_file (for target language code 'trg') is:
1398      * `gs://translation_test/a_b_c_'trg'_translations.[extension]`
1399      * If the input file extension is tsv, the output has the following
1400      * columns:
1401      * Column 1: ID of the request provided in the input, if it's not
1402      * provided in the input, then the input row number is used (0-based).
1403      * Column 2: source sentence.
1404      * Column 3: translation without applying a glossary. Empty string if there
1405      * is an error.
1406      * Column 4 (only present if a glossary is provided in the request):
1407      * translation after applying the glossary. Empty string if there is an
1408      * error applying the glossary. Could be same string as column 3 if there is
1409      * no glossary applied.
1410      * If input file extension is a txt or html, the translation is directly
1411      * written to the output file. If glossary is requested, a separate
1412      * glossary_translations_file has format of
1413      * gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]
1414      * The format of errors file (for target language code 'trg') is:
1415      * gs://translation_test/a_b_c_'trg'_errors.[extension]
1416      * If the input file extension is tsv, errors_file contains the following:
1417      * Column 1: ID of the request provided in the input, if it's not
1418      * provided in the input, then the input row number is used (0-based).
1419      * Column 2: source sentence.
1420      * Column 3: Error detail for the translation. Could be empty.
1421      * Column 4 (only present if a glossary is provided in the request):
1422      * Error when applying the glossary.
1423      * If the input file extension is txt or html, glossary_error_file will be
1424      * generated that contains error details. glossary_error_file has format of
1425      * gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]
1426      * </pre>
1427      *
1428      * <code>.google.cloud.translation.v3.GcsDestination gcs_destination = 1;</code>
1429      */
1430     private com.google.protobuf.SingleFieldBuilderV3<
1431             com.google.cloud.translate.v3.GcsDestination,
1432             com.google.cloud.translate.v3.GcsDestination.Builder,
1433             com.google.cloud.translate.v3.GcsDestinationOrBuilder>
getGcsDestinationFieldBuilder()1434         getGcsDestinationFieldBuilder() {
1435       if (gcsDestinationBuilder_ == null) {
1436         if (!(destinationCase_ == 1)) {
1437           destination_ = com.google.cloud.translate.v3.GcsDestination.getDefaultInstance();
1438         }
1439         gcsDestinationBuilder_ =
1440             new com.google.protobuf.SingleFieldBuilderV3<
1441                 com.google.cloud.translate.v3.GcsDestination,
1442                 com.google.cloud.translate.v3.GcsDestination.Builder,
1443                 com.google.cloud.translate.v3.GcsDestinationOrBuilder>(
1444                 (com.google.cloud.translate.v3.GcsDestination) destination_,
1445                 getParentForChildren(),
1446                 isClean());
1447         destination_ = null;
1448       }
1449       destinationCase_ = 1;
1450       onChanged();
1451       return gcsDestinationBuilder_;
1452     }
1453 
1454     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1455     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1456       return super.setUnknownFields(unknownFields);
1457     }
1458 
1459     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1460     public final Builder mergeUnknownFields(
1461         final com.google.protobuf.UnknownFieldSet unknownFields) {
1462       return super.mergeUnknownFields(unknownFields);
1463     }
1464 
1465     // @@protoc_insertion_point(builder_scope:google.cloud.translation.v3.OutputConfig)
1466   }
1467 
1468   // @@protoc_insertion_point(class_scope:google.cloud.translation.v3.OutputConfig)
1469   private static final com.google.cloud.translate.v3.OutputConfig DEFAULT_INSTANCE;
1470 
1471   static {
1472     DEFAULT_INSTANCE = new com.google.cloud.translate.v3.OutputConfig();
1473   }
1474 
getDefaultInstance()1475   public static com.google.cloud.translate.v3.OutputConfig getDefaultInstance() {
1476     return DEFAULT_INSTANCE;
1477   }
1478 
1479   private static final com.google.protobuf.Parser<OutputConfig> PARSER =
1480       new com.google.protobuf.AbstractParser<OutputConfig>() {
1481         @java.lang.Override
1482         public OutputConfig parsePartialFrom(
1483             com.google.protobuf.CodedInputStream input,
1484             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1485             throws com.google.protobuf.InvalidProtocolBufferException {
1486           Builder builder = newBuilder();
1487           try {
1488             builder.mergeFrom(input, extensionRegistry);
1489           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1490             throw e.setUnfinishedMessage(builder.buildPartial());
1491           } catch (com.google.protobuf.UninitializedMessageException e) {
1492             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1493           } catch (java.io.IOException e) {
1494             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1495                 .setUnfinishedMessage(builder.buildPartial());
1496           }
1497           return builder.buildPartial();
1498         }
1499       };
1500 
parser()1501   public static com.google.protobuf.Parser<OutputConfig> parser() {
1502     return PARSER;
1503   }
1504 
1505   @java.lang.Override
getParserForType()1506   public com.google.protobuf.Parser<OutputConfig> getParserForType() {
1507     return PARSER;
1508   }
1509 
1510   @java.lang.Override
getDefaultInstanceForType()1511   public com.google.cloud.translate.v3.OutputConfig getDefaultInstanceForType() {
1512     return DEFAULT_INSTANCE;
1513   }
1514 }
1515