• 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/automl/v1/translation.proto
18 
19 package com.google.cloud.automl.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Annotation details specific to translation.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.automl.v1.TranslationAnnotation}
29  */
30 public final class TranslationAnnotation extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.TranslationAnnotation)
33     TranslationAnnotationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use TranslationAnnotation.newBuilder() to construct.
TranslationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private TranslationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
TranslationAnnotation()40   private TranslationAnnotation() {}
41 
42   @java.lang.Override
43   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)44   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
45     return new TranslationAnnotation();
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.automl.v1.TranslationProto
55         .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor;
56   }
57 
58   @java.lang.Override
59   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()60       internalGetFieldAccessorTable() {
61     return com.google.cloud.automl.v1.TranslationProto
62         .internal_static_google_cloud_automl_v1_TranslationAnnotation_fieldAccessorTable
63         .ensureFieldAccessorsInitialized(
64             com.google.cloud.automl.v1.TranslationAnnotation.class,
65             com.google.cloud.automl.v1.TranslationAnnotation.Builder.class);
66   }
67 
68   public static final int TRANSLATED_CONTENT_FIELD_NUMBER = 1;
69   private com.google.cloud.automl.v1.TextSnippet translatedContent_;
70   /**
71    *
72    *
73    * <pre>
74    * Output only . The translated content.
75    * </pre>
76    *
77    * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
78    *
79    * @return Whether the translatedContent field is set.
80    */
81   @java.lang.Override
hasTranslatedContent()82   public boolean hasTranslatedContent() {
83     return translatedContent_ != null;
84   }
85   /**
86    *
87    *
88    * <pre>
89    * Output only . The translated content.
90    * </pre>
91    *
92    * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
93    *
94    * @return The translatedContent.
95    */
96   @java.lang.Override
getTranslatedContent()97   public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() {
98     return translatedContent_ == null
99         ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()
100         : translatedContent_;
101   }
102   /**
103    *
104    *
105    * <pre>
106    * Output only . The translated content.
107    * </pre>
108    *
109    * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
110    */
111   @java.lang.Override
getTranslatedContentOrBuilder()112   public com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder() {
113     return translatedContent_ == null
114         ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()
115         : translatedContent_;
116   }
117 
118   private byte memoizedIsInitialized = -1;
119 
120   @java.lang.Override
isInitialized()121   public final boolean isInitialized() {
122     byte isInitialized = memoizedIsInitialized;
123     if (isInitialized == 1) return true;
124     if (isInitialized == 0) return false;
125 
126     memoizedIsInitialized = 1;
127     return true;
128   }
129 
130   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)131   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
132     if (translatedContent_ != null) {
133       output.writeMessage(1, getTranslatedContent());
134     }
135     getUnknownFields().writeTo(output);
136   }
137 
138   @java.lang.Override
getSerializedSize()139   public int getSerializedSize() {
140     int size = memoizedSize;
141     if (size != -1) return size;
142 
143     size = 0;
144     if (translatedContent_ != null) {
145       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTranslatedContent());
146     }
147     size += getUnknownFields().getSerializedSize();
148     memoizedSize = size;
149     return size;
150   }
151 
152   @java.lang.Override
equals(final java.lang.Object obj)153   public boolean equals(final java.lang.Object obj) {
154     if (obj == this) {
155       return true;
156     }
157     if (!(obj instanceof com.google.cloud.automl.v1.TranslationAnnotation)) {
158       return super.equals(obj);
159     }
160     com.google.cloud.automl.v1.TranslationAnnotation other =
161         (com.google.cloud.automl.v1.TranslationAnnotation) obj;
162 
163     if (hasTranslatedContent() != other.hasTranslatedContent()) return false;
164     if (hasTranslatedContent()) {
165       if (!getTranslatedContent().equals(other.getTranslatedContent())) return false;
166     }
167     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
168     return true;
169   }
170 
171   @java.lang.Override
hashCode()172   public int hashCode() {
173     if (memoizedHashCode != 0) {
174       return memoizedHashCode;
175     }
176     int hash = 41;
177     hash = (19 * hash) + getDescriptor().hashCode();
178     if (hasTranslatedContent()) {
179       hash = (37 * hash) + TRANSLATED_CONTENT_FIELD_NUMBER;
180       hash = (53 * hash) + getTranslatedContent().hashCode();
181     }
182     hash = (29 * hash) + getUnknownFields().hashCode();
183     memoizedHashCode = hash;
184     return hash;
185   }
186 
parseFrom(java.nio.ByteBuffer data)187   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(java.nio.ByteBuffer data)
188       throws com.google.protobuf.InvalidProtocolBufferException {
189     return PARSER.parseFrom(data);
190   }
191 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)192   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
193       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
194       throws com.google.protobuf.InvalidProtocolBufferException {
195     return PARSER.parseFrom(data, extensionRegistry);
196   }
197 
parseFrom( com.google.protobuf.ByteString data)198   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
199       com.google.protobuf.ByteString data)
200       throws com.google.protobuf.InvalidProtocolBufferException {
201     return PARSER.parseFrom(data);
202   }
203 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)204   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
205       com.google.protobuf.ByteString data,
206       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
207       throws com.google.protobuf.InvalidProtocolBufferException {
208     return PARSER.parseFrom(data, extensionRegistry);
209   }
210 
parseFrom(byte[] data)211   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(byte[] data)
212       throws com.google.protobuf.InvalidProtocolBufferException {
213     return PARSER.parseFrom(data);
214   }
215 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)216   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
217       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
218       throws com.google.protobuf.InvalidProtocolBufferException {
219     return PARSER.parseFrom(data, extensionRegistry);
220   }
221 
parseFrom( java.io.InputStream input)222   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
223       java.io.InputStream input) throws java.io.IOException {
224     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
225   }
226 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)227   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
228       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
229       throws java.io.IOException {
230     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
231         PARSER, input, extensionRegistry);
232   }
233 
parseDelimitedFrom( java.io.InputStream input)234   public static com.google.cloud.automl.v1.TranslationAnnotation parseDelimitedFrom(
235       java.io.InputStream input) throws java.io.IOException {
236     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
237   }
238 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)239   public static com.google.cloud.automl.v1.TranslationAnnotation parseDelimitedFrom(
240       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
241       throws java.io.IOException {
242     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
243         PARSER, input, extensionRegistry);
244   }
245 
parseFrom( com.google.protobuf.CodedInputStream input)246   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
247       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
248     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
249   }
250 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)251   public static com.google.cloud.automl.v1.TranslationAnnotation parseFrom(
252       com.google.protobuf.CodedInputStream input,
253       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
254       throws java.io.IOException {
255     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
256         PARSER, input, extensionRegistry);
257   }
258 
259   @java.lang.Override
newBuilderForType()260   public Builder newBuilderForType() {
261     return newBuilder();
262   }
263 
newBuilder()264   public static Builder newBuilder() {
265     return DEFAULT_INSTANCE.toBuilder();
266   }
267 
newBuilder(com.google.cloud.automl.v1.TranslationAnnotation prototype)268   public static Builder newBuilder(com.google.cloud.automl.v1.TranslationAnnotation prototype) {
269     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
270   }
271 
272   @java.lang.Override
toBuilder()273   public Builder toBuilder() {
274     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
275   }
276 
277   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)278   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
279     Builder builder = new Builder(parent);
280     return builder;
281   }
282   /**
283    *
284    *
285    * <pre>
286    * Annotation details specific to translation.
287    * </pre>
288    *
289    * Protobuf type {@code google.cloud.automl.v1.TranslationAnnotation}
290    */
291   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
292       implements
293       // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.TranslationAnnotation)
294       com.google.cloud.automl.v1.TranslationAnnotationOrBuilder {
getDescriptor()295     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
296       return com.google.cloud.automl.v1.TranslationProto
297           .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor;
298     }
299 
300     @java.lang.Override
301     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()302         internalGetFieldAccessorTable() {
303       return com.google.cloud.automl.v1.TranslationProto
304           .internal_static_google_cloud_automl_v1_TranslationAnnotation_fieldAccessorTable
305           .ensureFieldAccessorsInitialized(
306               com.google.cloud.automl.v1.TranslationAnnotation.class,
307               com.google.cloud.automl.v1.TranslationAnnotation.Builder.class);
308     }
309 
310     // Construct using com.google.cloud.automl.v1.TranslationAnnotation.newBuilder()
Builder()311     private Builder() {}
312 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)313     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
314       super(parent);
315     }
316 
317     @java.lang.Override
clear()318     public Builder clear() {
319       super.clear();
320       bitField0_ = 0;
321       translatedContent_ = null;
322       if (translatedContentBuilder_ != null) {
323         translatedContentBuilder_.dispose();
324         translatedContentBuilder_ = null;
325       }
326       return this;
327     }
328 
329     @java.lang.Override
getDescriptorForType()330     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
331       return com.google.cloud.automl.v1.TranslationProto
332           .internal_static_google_cloud_automl_v1_TranslationAnnotation_descriptor;
333     }
334 
335     @java.lang.Override
getDefaultInstanceForType()336     public com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstanceForType() {
337       return com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance();
338     }
339 
340     @java.lang.Override
build()341     public com.google.cloud.automl.v1.TranslationAnnotation build() {
342       com.google.cloud.automl.v1.TranslationAnnotation result = buildPartial();
343       if (!result.isInitialized()) {
344         throw newUninitializedMessageException(result);
345       }
346       return result;
347     }
348 
349     @java.lang.Override
buildPartial()350     public com.google.cloud.automl.v1.TranslationAnnotation buildPartial() {
351       com.google.cloud.automl.v1.TranslationAnnotation result =
352           new com.google.cloud.automl.v1.TranslationAnnotation(this);
353       if (bitField0_ != 0) {
354         buildPartial0(result);
355       }
356       onBuilt();
357       return result;
358     }
359 
buildPartial0(com.google.cloud.automl.v1.TranslationAnnotation result)360     private void buildPartial0(com.google.cloud.automl.v1.TranslationAnnotation result) {
361       int from_bitField0_ = bitField0_;
362       if (((from_bitField0_ & 0x00000001) != 0)) {
363         result.translatedContent_ =
364             translatedContentBuilder_ == null
365                 ? translatedContent_
366                 : translatedContentBuilder_.build();
367       }
368     }
369 
370     @java.lang.Override
clone()371     public Builder clone() {
372       return super.clone();
373     }
374 
375     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)376     public Builder setField(
377         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
378       return super.setField(field, value);
379     }
380 
381     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)382     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
383       return super.clearField(field);
384     }
385 
386     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)387     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
388       return super.clearOneof(oneof);
389     }
390 
391     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)392     public Builder setRepeatedField(
393         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
394       return super.setRepeatedField(field, index, value);
395     }
396 
397     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)398     public Builder addRepeatedField(
399         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
400       return super.addRepeatedField(field, value);
401     }
402 
403     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)404     public Builder mergeFrom(com.google.protobuf.Message other) {
405       if (other instanceof com.google.cloud.automl.v1.TranslationAnnotation) {
406         return mergeFrom((com.google.cloud.automl.v1.TranslationAnnotation) other);
407       } else {
408         super.mergeFrom(other);
409         return this;
410       }
411     }
412 
mergeFrom(com.google.cloud.automl.v1.TranslationAnnotation other)413     public Builder mergeFrom(com.google.cloud.automl.v1.TranslationAnnotation other) {
414       if (other == com.google.cloud.automl.v1.TranslationAnnotation.getDefaultInstance())
415         return this;
416       if (other.hasTranslatedContent()) {
417         mergeTranslatedContent(other.getTranslatedContent());
418       }
419       this.mergeUnknownFields(other.getUnknownFields());
420       onChanged();
421       return this;
422     }
423 
424     @java.lang.Override
isInitialized()425     public final boolean isInitialized() {
426       return true;
427     }
428 
429     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)430     public Builder mergeFrom(
431         com.google.protobuf.CodedInputStream input,
432         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
433         throws java.io.IOException {
434       if (extensionRegistry == null) {
435         throw new java.lang.NullPointerException();
436       }
437       try {
438         boolean done = false;
439         while (!done) {
440           int tag = input.readTag();
441           switch (tag) {
442             case 0:
443               done = true;
444               break;
445             case 10:
446               {
447                 input.readMessage(
448                     getTranslatedContentFieldBuilder().getBuilder(), extensionRegistry);
449                 bitField0_ |= 0x00000001;
450                 break;
451               } // case 10
452             default:
453               {
454                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
455                   done = true; // was an endgroup tag
456                 }
457                 break;
458               } // default:
459           } // switch (tag)
460         } // while (!done)
461       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
462         throw e.unwrapIOException();
463       } finally {
464         onChanged();
465       } // finally
466       return this;
467     }
468 
469     private int bitField0_;
470 
471     private com.google.cloud.automl.v1.TextSnippet translatedContent_;
472     private com.google.protobuf.SingleFieldBuilderV3<
473             com.google.cloud.automl.v1.TextSnippet,
474             com.google.cloud.automl.v1.TextSnippet.Builder,
475             com.google.cloud.automl.v1.TextSnippetOrBuilder>
476         translatedContentBuilder_;
477     /**
478      *
479      *
480      * <pre>
481      * Output only . The translated content.
482      * </pre>
483      *
484      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
485      *
486      * @return Whether the translatedContent field is set.
487      */
hasTranslatedContent()488     public boolean hasTranslatedContent() {
489       return ((bitField0_ & 0x00000001) != 0);
490     }
491     /**
492      *
493      *
494      * <pre>
495      * Output only . The translated content.
496      * </pre>
497      *
498      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
499      *
500      * @return The translatedContent.
501      */
getTranslatedContent()502     public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() {
503       if (translatedContentBuilder_ == null) {
504         return translatedContent_ == null
505             ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()
506             : translatedContent_;
507       } else {
508         return translatedContentBuilder_.getMessage();
509       }
510     }
511     /**
512      *
513      *
514      * <pre>
515      * Output only . The translated content.
516      * </pre>
517      *
518      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
519      */
setTranslatedContent(com.google.cloud.automl.v1.TextSnippet value)520     public Builder setTranslatedContent(com.google.cloud.automl.v1.TextSnippet value) {
521       if (translatedContentBuilder_ == null) {
522         if (value == null) {
523           throw new NullPointerException();
524         }
525         translatedContent_ = value;
526       } else {
527         translatedContentBuilder_.setMessage(value);
528       }
529       bitField0_ |= 0x00000001;
530       onChanged();
531       return this;
532     }
533     /**
534      *
535      *
536      * <pre>
537      * Output only . The translated content.
538      * </pre>
539      *
540      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
541      */
setTranslatedContent( com.google.cloud.automl.v1.TextSnippet.Builder builderForValue)542     public Builder setTranslatedContent(
543         com.google.cloud.automl.v1.TextSnippet.Builder builderForValue) {
544       if (translatedContentBuilder_ == null) {
545         translatedContent_ = builderForValue.build();
546       } else {
547         translatedContentBuilder_.setMessage(builderForValue.build());
548       }
549       bitField0_ |= 0x00000001;
550       onChanged();
551       return this;
552     }
553     /**
554      *
555      *
556      * <pre>
557      * Output only . The translated content.
558      * </pre>
559      *
560      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
561      */
mergeTranslatedContent(com.google.cloud.automl.v1.TextSnippet value)562     public Builder mergeTranslatedContent(com.google.cloud.automl.v1.TextSnippet value) {
563       if (translatedContentBuilder_ == null) {
564         if (((bitField0_ & 0x00000001) != 0)
565             && translatedContent_ != null
566             && translatedContent_ != com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()) {
567           getTranslatedContentBuilder().mergeFrom(value);
568         } else {
569           translatedContent_ = value;
570         }
571       } else {
572         translatedContentBuilder_.mergeFrom(value);
573       }
574       bitField0_ |= 0x00000001;
575       onChanged();
576       return this;
577     }
578     /**
579      *
580      *
581      * <pre>
582      * Output only . The translated content.
583      * </pre>
584      *
585      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
586      */
clearTranslatedContent()587     public Builder clearTranslatedContent() {
588       bitField0_ = (bitField0_ & ~0x00000001);
589       translatedContent_ = null;
590       if (translatedContentBuilder_ != null) {
591         translatedContentBuilder_.dispose();
592         translatedContentBuilder_ = null;
593       }
594       onChanged();
595       return this;
596     }
597     /**
598      *
599      *
600      * <pre>
601      * Output only . The translated content.
602      * </pre>
603      *
604      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
605      */
getTranslatedContentBuilder()606     public com.google.cloud.automl.v1.TextSnippet.Builder getTranslatedContentBuilder() {
607       bitField0_ |= 0x00000001;
608       onChanged();
609       return getTranslatedContentFieldBuilder().getBuilder();
610     }
611     /**
612      *
613      *
614      * <pre>
615      * Output only . The translated content.
616      * </pre>
617      *
618      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
619      */
getTranslatedContentOrBuilder()620     public com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder() {
621       if (translatedContentBuilder_ != null) {
622         return translatedContentBuilder_.getMessageOrBuilder();
623       } else {
624         return translatedContent_ == null
625             ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance()
626             : translatedContent_;
627       }
628     }
629     /**
630      *
631      *
632      * <pre>
633      * Output only . The translated content.
634      * </pre>
635      *
636      * <code>.google.cloud.automl.v1.TextSnippet translated_content = 1;</code>
637      */
638     private com.google.protobuf.SingleFieldBuilderV3<
639             com.google.cloud.automl.v1.TextSnippet,
640             com.google.cloud.automl.v1.TextSnippet.Builder,
641             com.google.cloud.automl.v1.TextSnippetOrBuilder>
getTranslatedContentFieldBuilder()642         getTranslatedContentFieldBuilder() {
643       if (translatedContentBuilder_ == null) {
644         translatedContentBuilder_ =
645             new com.google.protobuf.SingleFieldBuilderV3<
646                 com.google.cloud.automl.v1.TextSnippet,
647                 com.google.cloud.automl.v1.TextSnippet.Builder,
648                 com.google.cloud.automl.v1.TextSnippetOrBuilder>(
649                 getTranslatedContent(), getParentForChildren(), isClean());
650         translatedContent_ = null;
651       }
652       return translatedContentBuilder_;
653     }
654 
655     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)656     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
657       return super.setUnknownFields(unknownFields);
658     }
659 
660     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)661     public final Builder mergeUnknownFields(
662         final com.google.protobuf.UnknownFieldSet unknownFields) {
663       return super.mergeUnknownFields(unknownFields);
664     }
665 
666     // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.TranslationAnnotation)
667   }
668 
669   // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.TranslationAnnotation)
670   private static final com.google.cloud.automl.v1.TranslationAnnotation DEFAULT_INSTANCE;
671 
672   static {
673     DEFAULT_INSTANCE = new com.google.cloud.automl.v1.TranslationAnnotation();
674   }
675 
getDefaultInstance()676   public static com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstance() {
677     return DEFAULT_INSTANCE;
678   }
679 
680   private static final com.google.protobuf.Parser<TranslationAnnotation> PARSER =
681       new com.google.protobuf.AbstractParser<TranslationAnnotation>() {
682         @java.lang.Override
683         public TranslationAnnotation parsePartialFrom(
684             com.google.protobuf.CodedInputStream input,
685             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
686             throws com.google.protobuf.InvalidProtocolBufferException {
687           Builder builder = newBuilder();
688           try {
689             builder.mergeFrom(input, extensionRegistry);
690           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
691             throw e.setUnfinishedMessage(builder.buildPartial());
692           } catch (com.google.protobuf.UninitializedMessageException e) {
693             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
694           } catch (java.io.IOException e) {
695             throw new com.google.protobuf.InvalidProtocolBufferException(e)
696                 .setUnfinishedMessage(builder.buildPartial());
697           }
698           return builder.buildPartial();
699         }
700       };
701 
parser()702   public static com.google.protobuf.Parser<TranslationAnnotation> parser() {
703     return PARSER;
704   }
705 
706   @java.lang.Override
getParserForType()707   public com.google.protobuf.Parser<TranslationAnnotation> getParserForType() {
708     return PARSER;
709   }
710 
711   @java.lang.Override
getDefaultInstanceForType()712   public com.google.cloud.automl.v1.TranslationAnnotation getDefaultInstanceForType() {
713     return DEFAULT_INSTANCE;
714   }
715 }
716