• 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/vision/v1/image_annotator.proto
18 
19 package com.google.cloud.vision.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Response to an image annotation request.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse}
29  */
30 public final class AnnotateImageResponse extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageResponse)
33     AnnotateImageResponseOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use AnnotateImageResponse.newBuilder() to construct.
AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
AnnotateImageResponse()40   private AnnotateImageResponse() {
41     faceAnnotations_ = java.util.Collections.emptyList();
42     landmarkAnnotations_ = java.util.Collections.emptyList();
43     logoAnnotations_ = java.util.Collections.emptyList();
44     labelAnnotations_ = java.util.Collections.emptyList();
45     localizedObjectAnnotations_ = java.util.Collections.emptyList();
46     textAnnotations_ = java.util.Collections.emptyList();
47   }
48 
49   @java.lang.Override
50   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)51   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
52     return new AnnotateImageResponse();
53   }
54 
55   @java.lang.Override
getUnknownFields()56   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57     return this.unknownFields;
58   }
59 
getDescriptor()60   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
61     return com.google.cloud.vision.v1.ImageAnnotatorProto
62         .internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
63   }
64 
65   @java.lang.Override
66   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()67       internalGetFieldAccessorTable() {
68     return com.google.cloud.vision.v1.ImageAnnotatorProto
69         .internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable
70         .ensureFieldAccessorsInitialized(
71             com.google.cloud.vision.v1.AnnotateImageResponse.class,
72             com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class);
73   }
74 
75   public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1;
76 
77   @SuppressWarnings("serial")
78   private java.util.List<com.google.cloud.vision.v1.FaceAnnotation> faceAnnotations_;
79   /**
80    *
81    *
82    * <pre>
83    * If present, face detection has completed successfully.
84    * </pre>
85    *
86    * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
87    */
88   @java.lang.Override
getFaceAnnotationsList()89   public java.util.List<com.google.cloud.vision.v1.FaceAnnotation> getFaceAnnotationsList() {
90     return faceAnnotations_;
91   }
92   /**
93    *
94    *
95    * <pre>
96    * If present, face detection has completed successfully.
97    * </pre>
98    *
99    * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
100    */
101   @java.lang.Override
102   public java.util.List<? extends com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsOrBuilderList()103       getFaceAnnotationsOrBuilderList() {
104     return faceAnnotations_;
105   }
106   /**
107    *
108    *
109    * <pre>
110    * If present, face detection has completed successfully.
111    * </pre>
112    *
113    * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
114    */
115   @java.lang.Override
getFaceAnnotationsCount()116   public int getFaceAnnotationsCount() {
117     return faceAnnotations_.size();
118   }
119   /**
120    *
121    *
122    * <pre>
123    * If present, face detection has completed successfully.
124    * </pre>
125    *
126    * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
127    */
128   @java.lang.Override
getFaceAnnotations(int index)129   public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) {
130     return faceAnnotations_.get(index);
131   }
132   /**
133    *
134    *
135    * <pre>
136    * If present, face detection has completed successfully.
137    * </pre>
138    *
139    * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
140    */
141   @java.lang.Override
getFaceAnnotationsOrBuilder(int index)142   public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(int index) {
143     return faceAnnotations_.get(index);
144   }
145 
146   public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2;
147 
148   @SuppressWarnings("serial")
149   private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> landmarkAnnotations_;
150   /**
151    *
152    *
153    * <pre>
154    * If present, landmark detection has completed successfully.
155    * </pre>
156    *
157    * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
158    */
159   @java.lang.Override
getLandmarkAnnotationsList()160   public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getLandmarkAnnotationsList() {
161     return landmarkAnnotations_;
162   }
163   /**
164    *
165    *
166    * <pre>
167    * If present, landmark detection has completed successfully.
168    * </pre>
169    *
170    * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
171    */
172   @java.lang.Override
173   public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsOrBuilderList()174       getLandmarkAnnotationsOrBuilderList() {
175     return landmarkAnnotations_;
176   }
177   /**
178    *
179    *
180    * <pre>
181    * If present, landmark detection has completed successfully.
182    * </pre>
183    *
184    * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
185    */
186   @java.lang.Override
getLandmarkAnnotationsCount()187   public int getLandmarkAnnotationsCount() {
188     return landmarkAnnotations_.size();
189   }
190   /**
191    *
192    *
193    * <pre>
194    * If present, landmark detection has completed successfully.
195    * </pre>
196    *
197    * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
198    */
199   @java.lang.Override
getLandmarkAnnotations(int index)200   public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) {
201     return landmarkAnnotations_.get(index);
202   }
203   /**
204    *
205    *
206    * <pre>
207    * If present, landmark detection has completed successfully.
208    * </pre>
209    *
210    * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
211    */
212   @java.lang.Override
getLandmarkAnnotationsOrBuilder( int index)213   public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(
214       int index) {
215     return landmarkAnnotations_.get(index);
216   }
217 
218   public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3;
219 
220   @SuppressWarnings("serial")
221   private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> logoAnnotations_;
222   /**
223    *
224    *
225    * <pre>
226    * If present, logo detection has completed successfully.
227    * </pre>
228    *
229    * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
230    */
231   @java.lang.Override
getLogoAnnotationsList()232   public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getLogoAnnotationsList() {
233     return logoAnnotations_;
234   }
235   /**
236    *
237    *
238    * <pre>
239    * If present, logo detection has completed successfully.
240    * </pre>
241    *
242    * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
243    */
244   @java.lang.Override
245   public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsOrBuilderList()246       getLogoAnnotationsOrBuilderList() {
247     return logoAnnotations_;
248   }
249   /**
250    *
251    *
252    * <pre>
253    * If present, logo detection has completed successfully.
254    * </pre>
255    *
256    * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
257    */
258   @java.lang.Override
getLogoAnnotationsCount()259   public int getLogoAnnotationsCount() {
260     return logoAnnotations_.size();
261   }
262   /**
263    *
264    *
265    * <pre>
266    * If present, logo detection has completed successfully.
267    * </pre>
268    *
269    * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
270    */
271   @java.lang.Override
getLogoAnnotations(int index)272   public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) {
273     return logoAnnotations_.get(index);
274   }
275   /**
276    *
277    *
278    * <pre>
279    * If present, logo detection has completed successfully.
280    * </pre>
281    *
282    * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
283    */
284   @java.lang.Override
getLogoAnnotationsOrBuilder( int index)285   public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
286       int index) {
287     return logoAnnotations_.get(index);
288   }
289 
290   public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4;
291 
292   @SuppressWarnings("serial")
293   private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> labelAnnotations_;
294   /**
295    *
296    *
297    * <pre>
298    * If present, label detection has completed successfully.
299    * </pre>
300    *
301    * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
302    */
303   @java.lang.Override
getLabelAnnotationsList()304   public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getLabelAnnotationsList() {
305     return labelAnnotations_;
306   }
307   /**
308    *
309    *
310    * <pre>
311    * If present, label detection has completed successfully.
312    * </pre>
313    *
314    * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
315    */
316   @java.lang.Override
317   public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsOrBuilderList()318       getLabelAnnotationsOrBuilderList() {
319     return labelAnnotations_;
320   }
321   /**
322    *
323    *
324    * <pre>
325    * If present, label detection has completed successfully.
326    * </pre>
327    *
328    * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
329    */
330   @java.lang.Override
getLabelAnnotationsCount()331   public int getLabelAnnotationsCount() {
332     return labelAnnotations_.size();
333   }
334   /**
335    *
336    *
337    * <pre>
338    * If present, label detection has completed successfully.
339    * </pre>
340    *
341    * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
342    */
343   @java.lang.Override
getLabelAnnotations(int index)344   public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) {
345     return labelAnnotations_.get(index);
346   }
347   /**
348    *
349    *
350    * <pre>
351    * If present, label detection has completed successfully.
352    * </pre>
353    *
354    * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
355    */
356   @java.lang.Override
getLabelAnnotationsOrBuilder( int index)357   public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
358       int index) {
359     return labelAnnotations_.get(index);
360   }
361 
362   public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22;
363 
364   @SuppressWarnings("serial")
365   private java.util.List<com.google.cloud.vision.v1.LocalizedObjectAnnotation>
366       localizedObjectAnnotations_;
367   /**
368    *
369    *
370    * <pre>
371    * If present, localized object detection has completed successfully.
372    * This will be sorted descending by confidence score.
373    * </pre>
374    *
375    * <code>
376    * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
377    * </code>
378    */
379   @java.lang.Override
380   public java.util.List<com.google.cloud.vision.v1.LocalizedObjectAnnotation>
getLocalizedObjectAnnotationsList()381       getLocalizedObjectAnnotationsList() {
382     return localizedObjectAnnotations_;
383   }
384   /**
385    *
386    *
387    * <pre>
388    * If present, localized object detection has completed successfully.
389    * This will be sorted descending by confidence score.
390    * </pre>
391    *
392    * <code>
393    * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
394    * </code>
395    */
396   @java.lang.Override
397   public java.util.List<? extends com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>
getLocalizedObjectAnnotationsOrBuilderList()398       getLocalizedObjectAnnotationsOrBuilderList() {
399     return localizedObjectAnnotations_;
400   }
401   /**
402    *
403    *
404    * <pre>
405    * If present, localized object detection has completed successfully.
406    * This will be sorted descending by confidence score.
407    * </pre>
408    *
409    * <code>
410    * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
411    * </code>
412    */
413   @java.lang.Override
getLocalizedObjectAnnotationsCount()414   public int getLocalizedObjectAnnotationsCount() {
415     return localizedObjectAnnotations_.size();
416   }
417   /**
418    *
419    *
420    * <pre>
421    * If present, localized object detection has completed successfully.
422    * This will be sorted descending by confidence score.
423    * </pre>
424    *
425    * <code>
426    * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
427    * </code>
428    */
429   @java.lang.Override
getLocalizedObjectAnnotations( int index)430   public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(
431       int index) {
432     return localizedObjectAnnotations_.get(index);
433   }
434   /**
435    *
436    *
437    * <pre>
438    * If present, localized object detection has completed successfully.
439    * This will be sorted descending by confidence score.
440    * </pre>
441    *
442    * <code>
443    * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
444    * </code>
445    */
446   @java.lang.Override
447   public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder
getLocalizedObjectAnnotationsOrBuilder(int index)448       getLocalizedObjectAnnotationsOrBuilder(int index) {
449     return localizedObjectAnnotations_.get(index);
450   }
451 
452   public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5;
453 
454   @SuppressWarnings("serial")
455   private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> textAnnotations_;
456   /**
457    *
458    *
459    * <pre>
460    * If present, text (OCR) detection has completed successfully.
461    * </pre>
462    *
463    * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
464    */
465   @java.lang.Override
getTextAnnotationsList()466   public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getTextAnnotationsList() {
467     return textAnnotations_;
468   }
469   /**
470    *
471    *
472    * <pre>
473    * If present, text (OCR) detection has completed successfully.
474    * </pre>
475    *
476    * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
477    */
478   @java.lang.Override
479   public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsOrBuilderList()480       getTextAnnotationsOrBuilderList() {
481     return textAnnotations_;
482   }
483   /**
484    *
485    *
486    * <pre>
487    * If present, text (OCR) detection has completed successfully.
488    * </pre>
489    *
490    * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
491    */
492   @java.lang.Override
getTextAnnotationsCount()493   public int getTextAnnotationsCount() {
494     return textAnnotations_.size();
495   }
496   /**
497    *
498    *
499    * <pre>
500    * If present, text (OCR) detection has completed successfully.
501    * </pre>
502    *
503    * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
504    */
505   @java.lang.Override
getTextAnnotations(int index)506   public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) {
507     return textAnnotations_.get(index);
508   }
509   /**
510    *
511    *
512    * <pre>
513    * If present, text (OCR) detection has completed successfully.
514    * </pre>
515    *
516    * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
517    */
518   @java.lang.Override
getTextAnnotationsOrBuilder( int index)519   public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
520       int index) {
521     return textAnnotations_.get(index);
522   }
523 
524   public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12;
525   private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_;
526   /**
527    *
528    *
529    * <pre>
530    * If present, text (OCR) detection or document (OCR) text detection has
531    * completed successfully.
532    * This annotation provides the structural hierarchy for the OCR detected
533    * text.
534    * </pre>
535    *
536    * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
537    *
538    * @return Whether the fullTextAnnotation field is set.
539    */
540   @java.lang.Override
hasFullTextAnnotation()541   public boolean hasFullTextAnnotation() {
542     return fullTextAnnotation_ != null;
543   }
544   /**
545    *
546    *
547    * <pre>
548    * If present, text (OCR) detection or document (OCR) text detection has
549    * completed successfully.
550    * This annotation provides the structural hierarchy for the OCR detected
551    * text.
552    * </pre>
553    *
554    * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
555    *
556    * @return The fullTextAnnotation.
557    */
558   @java.lang.Override
getFullTextAnnotation()559   public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() {
560     return fullTextAnnotation_ == null
561         ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()
562         : fullTextAnnotation_;
563   }
564   /**
565    *
566    *
567    * <pre>
568    * If present, text (OCR) detection or document (OCR) text detection has
569    * completed successfully.
570    * This annotation provides the structural hierarchy for the OCR detected
571    * text.
572    * </pre>
573    *
574    * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
575    */
576   @java.lang.Override
getFullTextAnnotationOrBuilder()577   public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() {
578     return fullTextAnnotation_ == null
579         ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()
580         : fullTextAnnotation_;
581   }
582 
583   public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6;
584   private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_;
585   /**
586    *
587    *
588    * <pre>
589    * If present, safe-search annotation has completed successfully.
590    * </pre>
591    *
592    * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
593    *
594    * @return Whether the safeSearchAnnotation field is set.
595    */
596   @java.lang.Override
hasSafeSearchAnnotation()597   public boolean hasSafeSearchAnnotation() {
598     return safeSearchAnnotation_ != null;
599   }
600   /**
601    *
602    *
603    * <pre>
604    * If present, safe-search annotation has completed successfully.
605    * </pre>
606    *
607    * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
608    *
609    * @return The safeSearchAnnotation.
610    */
611   @java.lang.Override
getSafeSearchAnnotation()612   public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() {
613     return safeSearchAnnotation_ == null
614         ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()
615         : safeSearchAnnotation_;
616   }
617   /**
618    *
619    *
620    * <pre>
621    * If present, safe-search annotation has completed successfully.
622    * </pre>
623    *
624    * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
625    */
626   @java.lang.Override
627   public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder
getSafeSearchAnnotationOrBuilder()628       getSafeSearchAnnotationOrBuilder() {
629     return safeSearchAnnotation_ == null
630         ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()
631         : safeSearchAnnotation_;
632   }
633 
634   public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8;
635   private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_;
636   /**
637    *
638    *
639    * <pre>
640    * If present, image properties were extracted successfully.
641    * </pre>
642    *
643    * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
644    *
645    * @return Whether the imagePropertiesAnnotation field is set.
646    */
647   @java.lang.Override
hasImagePropertiesAnnotation()648   public boolean hasImagePropertiesAnnotation() {
649     return imagePropertiesAnnotation_ != null;
650   }
651   /**
652    *
653    *
654    * <pre>
655    * If present, image properties were extracted successfully.
656    * </pre>
657    *
658    * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
659    *
660    * @return The imagePropertiesAnnotation.
661    */
662   @java.lang.Override
getImagePropertiesAnnotation()663   public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() {
664     return imagePropertiesAnnotation_ == null
665         ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()
666         : imagePropertiesAnnotation_;
667   }
668   /**
669    *
670    *
671    * <pre>
672    * If present, image properties were extracted successfully.
673    * </pre>
674    *
675    * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
676    */
677   @java.lang.Override
678   public com.google.cloud.vision.v1.ImagePropertiesOrBuilder
getImagePropertiesAnnotationOrBuilder()679       getImagePropertiesAnnotationOrBuilder() {
680     return imagePropertiesAnnotation_ == null
681         ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()
682         : imagePropertiesAnnotation_;
683   }
684 
685   public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11;
686   private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_;
687   /**
688    *
689    *
690    * <pre>
691    * If present, crop hints have completed successfully.
692    * </pre>
693    *
694    * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
695    *
696    * @return Whether the cropHintsAnnotation field is set.
697    */
698   @java.lang.Override
hasCropHintsAnnotation()699   public boolean hasCropHintsAnnotation() {
700     return cropHintsAnnotation_ != null;
701   }
702   /**
703    *
704    *
705    * <pre>
706    * If present, crop hints have completed successfully.
707    * </pre>
708    *
709    * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
710    *
711    * @return The cropHintsAnnotation.
712    */
713   @java.lang.Override
getCropHintsAnnotation()714   public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() {
715     return cropHintsAnnotation_ == null
716         ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()
717         : cropHintsAnnotation_;
718   }
719   /**
720    *
721    *
722    * <pre>
723    * If present, crop hints have completed successfully.
724    * </pre>
725    *
726    * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
727    */
728   @java.lang.Override
getCropHintsAnnotationOrBuilder()729   public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() {
730     return cropHintsAnnotation_ == null
731         ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()
732         : cropHintsAnnotation_;
733   }
734 
735   public static final int WEB_DETECTION_FIELD_NUMBER = 13;
736   private com.google.cloud.vision.v1.WebDetection webDetection_;
737   /**
738    *
739    *
740    * <pre>
741    * If present, web detection has completed successfully.
742    * </pre>
743    *
744    * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
745    *
746    * @return Whether the webDetection field is set.
747    */
748   @java.lang.Override
hasWebDetection()749   public boolean hasWebDetection() {
750     return webDetection_ != null;
751   }
752   /**
753    *
754    *
755    * <pre>
756    * If present, web detection has completed successfully.
757    * </pre>
758    *
759    * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
760    *
761    * @return The webDetection.
762    */
763   @java.lang.Override
getWebDetection()764   public com.google.cloud.vision.v1.WebDetection getWebDetection() {
765     return webDetection_ == null
766         ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance()
767         : webDetection_;
768   }
769   /**
770    *
771    *
772    * <pre>
773    * If present, web detection has completed successfully.
774    * </pre>
775    *
776    * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
777    */
778   @java.lang.Override
getWebDetectionOrBuilder()779   public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() {
780     return webDetection_ == null
781         ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance()
782         : webDetection_;
783   }
784 
785   public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14;
786   private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_;
787   /**
788    *
789    *
790    * <pre>
791    * If present, product search has completed successfully.
792    * </pre>
793    *
794    * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
795    *
796    * @return Whether the productSearchResults field is set.
797    */
798   @java.lang.Override
hasProductSearchResults()799   public boolean hasProductSearchResults() {
800     return productSearchResults_ != null;
801   }
802   /**
803    *
804    *
805    * <pre>
806    * If present, product search has completed successfully.
807    * </pre>
808    *
809    * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
810    *
811    * @return The productSearchResults.
812    */
813   @java.lang.Override
getProductSearchResults()814   public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() {
815     return productSearchResults_ == null
816         ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()
817         : productSearchResults_;
818   }
819   /**
820    *
821    *
822    * <pre>
823    * If present, product search has completed successfully.
824    * </pre>
825    *
826    * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
827    */
828   @java.lang.Override
829   public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder
getProductSearchResultsOrBuilder()830       getProductSearchResultsOrBuilder() {
831     return productSearchResults_ == null
832         ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()
833         : productSearchResults_;
834   }
835 
836   public static final int ERROR_FIELD_NUMBER = 9;
837   private com.google.rpc.Status error_;
838   /**
839    *
840    *
841    * <pre>
842    * If set, represents the error message for the operation.
843    * Note that filled-in image annotations are guaranteed to be
844    * correct, even when `error` is set.
845    * </pre>
846    *
847    * <code>.google.rpc.Status error = 9;</code>
848    *
849    * @return Whether the error field is set.
850    */
851   @java.lang.Override
hasError()852   public boolean hasError() {
853     return error_ != null;
854   }
855   /**
856    *
857    *
858    * <pre>
859    * If set, represents the error message for the operation.
860    * Note that filled-in image annotations are guaranteed to be
861    * correct, even when `error` is set.
862    * </pre>
863    *
864    * <code>.google.rpc.Status error = 9;</code>
865    *
866    * @return The error.
867    */
868   @java.lang.Override
getError()869   public com.google.rpc.Status getError() {
870     return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
871   }
872   /**
873    *
874    *
875    * <pre>
876    * If set, represents the error message for the operation.
877    * Note that filled-in image annotations are guaranteed to be
878    * correct, even when `error` is set.
879    * </pre>
880    *
881    * <code>.google.rpc.Status error = 9;</code>
882    */
883   @java.lang.Override
getErrorOrBuilder()884   public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
885     return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
886   }
887 
888   public static final int CONTEXT_FIELD_NUMBER = 21;
889   private com.google.cloud.vision.v1.ImageAnnotationContext context_;
890   /**
891    *
892    *
893    * <pre>
894    * If present, contextual information is needed to understand where this image
895    * comes from.
896    * </pre>
897    *
898    * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
899    *
900    * @return Whether the context field is set.
901    */
902   @java.lang.Override
hasContext()903   public boolean hasContext() {
904     return context_ != null;
905   }
906   /**
907    *
908    *
909    * <pre>
910    * If present, contextual information is needed to understand where this image
911    * comes from.
912    * </pre>
913    *
914    * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
915    *
916    * @return The context.
917    */
918   @java.lang.Override
getContext()919   public com.google.cloud.vision.v1.ImageAnnotationContext getContext() {
920     return context_ == null
921         ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()
922         : context_;
923   }
924   /**
925    *
926    *
927    * <pre>
928    * If present, contextual information is needed to understand where this image
929    * comes from.
930    * </pre>
931    *
932    * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
933    */
934   @java.lang.Override
getContextOrBuilder()935   public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() {
936     return context_ == null
937         ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()
938         : context_;
939   }
940 
941   private byte memoizedIsInitialized = -1;
942 
943   @java.lang.Override
isInitialized()944   public final boolean isInitialized() {
945     byte isInitialized = memoizedIsInitialized;
946     if (isInitialized == 1) return true;
947     if (isInitialized == 0) return false;
948 
949     memoizedIsInitialized = 1;
950     return true;
951   }
952 
953   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)954   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
955     for (int i = 0; i < faceAnnotations_.size(); i++) {
956       output.writeMessage(1, faceAnnotations_.get(i));
957     }
958     for (int i = 0; i < landmarkAnnotations_.size(); i++) {
959       output.writeMessage(2, landmarkAnnotations_.get(i));
960     }
961     for (int i = 0; i < logoAnnotations_.size(); i++) {
962       output.writeMessage(3, logoAnnotations_.get(i));
963     }
964     for (int i = 0; i < labelAnnotations_.size(); i++) {
965       output.writeMessage(4, labelAnnotations_.get(i));
966     }
967     for (int i = 0; i < textAnnotations_.size(); i++) {
968       output.writeMessage(5, textAnnotations_.get(i));
969     }
970     if (safeSearchAnnotation_ != null) {
971       output.writeMessage(6, getSafeSearchAnnotation());
972     }
973     if (imagePropertiesAnnotation_ != null) {
974       output.writeMessage(8, getImagePropertiesAnnotation());
975     }
976     if (error_ != null) {
977       output.writeMessage(9, getError());
978     }
979     if (cropHintsAnnotation_ != null) {
980       output.writeMessage(11, getCropHintsAnnotation());
981     }
982     if (fullTextAnnotation_ != null) {
983       output.writeMessage(12, getFullTextAnnotation());
984     }
985     if (webDetection_ != null) {
986       output.writeMessage(13, getWebDetection());
987     }
988     if (productSearchResults_ != null) {
989       output.writeMessage(14, getProductSearchResults());
990     }
991     if (context_ != null) {
992       output.writeMessage(21, getContext());
993     }
994     for (int i = 0; i < localizedObjectAnnotations_.size(); i++) {
995       output.writeMessage(22, localizedObjectAnnotations_.get(i));
996     }
997     getUnknownFields().writeTo(output);
998   }
999 
1000   @java.lang.Override
getSerializedSize()1001   public int getSerializedSize() {
1002     int size = memoizedSize;
1003     if (size != -1) return size;
1004 
1005     size = 0;
1006     for (int i = 0; i < faceAnnotations_.size(); i++) {
1007       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, faceAnnotations_.get(i));
1008     }
1009     for (int i = 0; i < landmarkAnnotations_.size(); i++) {
1010       size +=
1011           com.google.protobuf.CodedOutputStream.computeMessageSize(2, landmarkAnnotations_.get(i));
1012     }
1013     for (int i = 0; i < logoAnnotations_.size(); i++) {
1014       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, logoAnnotations_.get(i));
1015     }
1016     for (int i = 0; i < labelAnnotations_.size(); i++) {
1017       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labelAnnotations_.get(i));
1018     }
1019     for (int i = 0; i < textAnnotations_.size(); i++) {
1020       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, textAnnotations_.get(i));
1021     }
1022     if (safeSearchAnnotation_ != null) {
1023       size +=
1024           com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSafeSearchAnnotation());
1025     }
1026     if (imagePropertiesAnnotation_ != null) {
1027       size +=
1028           com.google.protobuf.CodedOutputStream.computeMessageSize(
1029               8, getImagePropertiesAnnotation());
1030     }
1031     if (error_ != null) {
1032       size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getError());
1033     }
1034     if (cropHintsAnnotation_ != null) {
1035       size +=
1036           com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCropHintsAnnotation());
1037     }
1038     if (fullTextAnnotation_ != null) {
1039       size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getFullTextAnnotation());
1040     }
1041     if (webDetection_ != null) {
1042       size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getWebDetection());
1043     }
1044     if (productSearchResults_ != null) {
1045       size +=
1046           com.google.protobuf.CodedOutputStream.computeMessageSize(14, getProductSearchResults());
1047     }
1048     if (context_ != null) {
1049       size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getContext());
1050     }
1051     for (int i = 0; i < localizedObjectAnnotations_.size(); i++) {
1052       size +=
1053           com.google.protobuf.CodedOutputStream.computeMessageSize(
1054               22, localizedObjectAnnotations_.get(i));
1055     }
1056     size += getUnknownFields().getSerializedSize();
1057     memoizedSize = size;
1058     return size;
1059   }
1060 
1061   @java.lang.Override
equals(final java.lang.Object obj)1062   public boolean equals(final java.lang.Object obj) {
1063     if (obj == this) {
1064       return true;
1065     }
1066     if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageResponse)) {
1067       return super.equals(obj);
1068     }
1069     com.google.cloud.vision.v1.AnnotateImageResponse other =
1070         (com.google.cloud.vision.v1.AnnotateImageResponse) obj;
1071 
1072     if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false;
1073     if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false;
1074     if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false;
1075     if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false;
1076     if (!getLocalizedObjectAnnotationsList().equals(other.getLocalizedObjectAnnotationsList()))
1077       return false;
1078     if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false;
1079     if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false;
1080     if (hasFullTextAnnotation()) {
1081       if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false;
1082     }
1083     if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false;
1084     if (hasSafeSearchAnnotation()) {
1085       if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false;
1086     }
1087     if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false;
1088     if (hasImagePropertiesAnnotation()) {
1089       if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()))
1090         return false;
1091     }
1092     if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false;
1093     if (hasCropHintsAnnotation()) {
1094       if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false;
1095     }
1096     if (hasWebDetection() != other.hasWebDetection()) return false;
1097     if (hasWebDetection()) {
1098       if (!getWebDetection().equals(other.getWebDetection())) return false;
1099     }
1100     if (hasProductSearchResults() != other.hasProductSearchResults()) return false;
1101     if (hasProductSearchResults()) {
1102       if (!getProductSearchResults().equals(other.getProductSearchResults())) return false;
1103     }
1104     if (hasError() != other.hasError()) return false;
1105     if (hasError()) {
1106       if (!getError().equals(other.getError())) return false;
1107     }
1108     if (hasContext() != other.hasContext()) return false;
1109     if (hasContext()) {
1110       if (!getContext().equals(other.getContext())) return false;
1111     }
1112     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1113     return true;
1114   }
1115 
1116   @java.lang.Override
hashCode()1117   public int hashCode() {
1118     if (memoizedHashCode != 0) {
1119       return memoizedHashCode;
1120     }
1121     int hash = 41;
1122     hash = (19 * hash) + getDescriptor().hashCode();
1123     if (getFaceAnnotationsCount() > 0) {
1124       hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER;
1125       hash = (53 * hash) + getFaceAnnotationsList().hashCode();
1126     }
1127     if (getLandmarkAnnotationsCount() > 0) {
1128       hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER;
1129       hash = (53 * hash) + getLandmarkAnnotationsList().hashCode();
1130     }
1131     if (getLogoAnnotationsCount() > 0) {
1132       hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER;
1133       hash = (53 * hash) + getLogoAnnotationsList().hashCode();
1134     }
1135     if (getLabelAnnotationsCount() > 0) {
1136       hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER;
1137       hash = (53 * hash) + getLabelAnnotationsList().hashCode();
1138     }
1139     if (getLocalizedObjectAnnotationsCount() > 0) {
1140       hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER;
1141       hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode();
1142     }
1143     if (getTextAnnotationsCount() > 0) {
1144       hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER;
1145       hash = (53 * hash) + getTextAnnotationsList().hashCode();
1146     }
1147     if (hasFullTextAnnotation()) {
1148       hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER;
1149       hash = (53 * hash) + getFullTextAnnotation().hashCode();
1150     }
1151     if (hasSafeSearchAnnotation()) {
1152       hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER;
1153       hash = (53 * hash) + getSafeSearchAnnotation().hashCode();
1154     }
1155     if (hasImagePropertiesAnnotation()) {
1156       hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER;
1157       hash = (53 * hash) + getImagePropertiesAnnotation().hashCode();
1158     }
1159     if (hasCropHintsAnnotation()) {
1160       hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER;
1161       hash = (53 * hash) + getCropHintsAnnotation().hashCode();
1162     }
1163     if (hasWebDetection()) {
1164       hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER;
1165       hash = (53 * hash) + getWebDetection().hashCode();
1166     }
1167     if (hasProductSearchResults()) {
1168       hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER;
1169       hash = (53 * hash) + getProductSearchResults().hashCode();
1170     }
1171     if (hasError()) {
1172       hash = (37 * hash) + ERROR_FIELD_NUMBER;
1173       hash = (53 * hash) + getError().hashCode();
1174     }
1175     if (hasContext()) {
1176       hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
1177       hash = (53 * hash) + getContext().hashCode();
1178     }
1179     hash = (29 * hash) + getUnknownFields().hashCode();
1180     memoizedHashCode = hash;
1181     return hash;
1182   }
1183 
parseFrom(java.nio.ByteBuffer data)1184   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(java.nio.ByteBuffer data)
1185       throws com.google.protobuf.InvalidProtocolBufferException {
1186     return PARSER.parseFrom(data);
1187   }
1188 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1189   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1190       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1191       throws com.google.protobuf.InvalidProtocolBufferException {
1192     return PARSER.parseFrom(data, extensionRegistry);
1193   }
1194 
parseFrom( com.google.protobuf.ByteString data)1195   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1196       com.google.protobuf.ByteString data)
1197       throws com.google.protobuf.InvalidProtocolBufferException {
1198     return PARSER.parseFrom(data);
1199   }
1200 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1201   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1202       com.google.protobuf.ByteString data,
1203       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1204       throws com.google.protobuf.InvalidProtocolBufferException {
1205     return PARSER.parseFrom(data, extensionRegistry);
1206   }
1207 
parseFrom(byte[] data)1208   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(byte[] data)
1209       throws com.google.protobuf.InvalidProtocolBufferException {
1210     return PARSER.parseFrom(data);
1211   }
1212 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1213   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1214       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1215       throws com.google.protobuf.InvalidProtocolBufferException {
1216     return PARSER.parseFrom(data, extensionRegistry);
1217   }
1218 
parseFrom( java.io.InputStream input)1219   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1220       java.io.InputStream input) throws java.io.IOException {
1221     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1222   }
1223 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1224   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1225       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1226       throws java.io.IOException {
1227     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1228         PARSER, input, extensionRegistry);
1229   }
1230 
parseDelimitedFrom( java.io.InputStream input)1231   public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom(
1232       java.io.InputStream input) throws java.io.IOException {
1233     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1234   }
1235 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1236   public static com.google.cloud.vision.v1.AnnotateImageResponse parseDelimitedFrom(
1237       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1238       throws java.io.IOException {
1239     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1240         PARSER, input, extensionRegistry);
1241   }
1242 
parseFrom( com.google.protobuf.CodedInputStream input)1243   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1244       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1245     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1246   }
1247 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1248   public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
1249       com.google.protobuf.CodedInputStream input,
1250       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1251       throws java.io.IOException {
1252     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1253         PARSER, input, extensionRegistry);
1254   }
1255 
1256   @java.lang.Override
newBuilderForType()1257   public Builder newBuilderForType() {
1258     return newBuilder();
1259   }
1260 
newBuilder()1261   public static Builder newBuilder() {
1262     return DEFAULT_INSTANCE.toBuilder();
1263   }
1264 
newBuilder(com.google.cloud.vision.v1.AnnotateImageResponse prototype)1265   public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageResponse prototype) {
1266     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1267   }
1268 
1269   @java.lang.Override
toBuilder()1270   public Builder toBuilder() {
1271     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1272   }
1273 
1274   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1275   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1276     Builder builder = new Builder(parent);
1277     return builder;
1278   }
1279   /**
1280    *
1281    *
1282    * <pre>
1283    * Response to an image annotation request.
1284    * </pre>
1285    *
1286    * Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse}
1287    */
1288   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1289       implements
1290       // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageResponse)
1291       com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder {
getDescriptor()1292     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1293       return com.google.cloud.vision.v1.ImageAnnotatorProto
1294           .internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
1295     }
1296 
1297     @java.lang.Override
1298     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1299         internalGetFieldAccessorTable() {
1300       return com.google.cloud.vision.v1.ImageAnnotatorProto
1301           .internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable
1302           .ensureFieldAccessorsInitialized(
1303               com.google.cloud.vision.v1.AnnotateImageResponse.class,
1304               com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class);
1305     }
1306 
1307     // Construct using com.google.cloud.vision.v1.AnnotateImageResponse.newBuilder()
Builder()1308     private Builder() {}
1309 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1310     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1311       super(parent);
1312     }
1313 
1314     @java.lang.Override
clear()1315     public Builder clear() {
1316       super.clear();
1317       bitField0_ = 0;
1318       if (faceAnnotationsBuilder_ == null) {
1319         faceAnnotations_ = java.util.Collections.emptyList();
1320       } else {
1321         faceAnnotations_ = null;
1322         faceAnnotationsBuilder_.clear();
1323       }
1324       bitField0_ = (bitField0_ & ~0x00000001);
1325       if (landmarkAnnotationsBuilder_ == null) {
1326         landmarkAnnotations_ = java.util.Collections.emptyList();
1327       } else {
1328         landmarkAnnotations_ = null;
1329         landmarkAnnotationsBuilder_.clear();
1330       }
1331       bitField0_ = (bitField0_ & ~0x00000002);
1332       if (logoAnnotationsBuilder_ == null) {
1333         logoAnnotations_ = java.util.Collections.emptyList();
1334       } else {
1335         logoAnnotations_ = null;
1336         logoAnnotationsBuilder_.clear();
1337       }
1338       bitField0_ = (bitField0_ & ~0x00000004);
1339       if (labelAnnotationsBuilder_ == null) {
1340         labelAnnotations_ = java.util.Collections.emptyList();
1341       } else {
1342         labelAnnotations_ = null;
1343         labelAnnotationsBuilder_.clear();
1344       }
1345       bitField0_ = (bitField0_ & ~0x00000008);
1346       if (localizedObjectAnnotationsBuilder_ == null) {
1347         localizedObjectAnnotations_ = java.util.Collections.emptyList();
1348       } else {
1349         localizedObjectAnnotations_ = null;
1350         localizedObjectAnnotationsBuilder_.clear();
1351       }
1352       bitField0_ = (bitField0_ & ~0x00000010);
1353       if (textAnnotationsBuilder_ == null) {
1354         textAnnotations_ = java.util.Collections.emptyList();
1355       } else {
1356         textAnnotations_ = null;
1357         textAnnotationsBuilder_.clear();
1358       }
1359       bitField0_ = (bitField0_ & ~0x00000020);
1360       fullTextAnnotation_ = null;
1361       if (fullTextAnnotationBuilder_ != null) {
1362         fullTextAnnotationBuilder_.dispose();
1363         fullTextAnnotationBuilder_ = null;
1364       }
1365       safeSearchAnnotation_ = null;
1366       if (safeSearchAnnotationBuilder_ != null) {
1367         safeSearchAnnotationBuilder_.dispose();
1368         safeSearchAnnotationBuilder_ = null;
1369       }
1370       imagePropertiesAnnotation_ = null;
1371       if (imagePropertiesAnnotationBuilder_ != null) {
1372         imagePropertiesAnnotationBuilder_.dispose();
1373         imagePropertiesAnnotationBuilder_ = null;
1374       }
1375       cropHintsAnnotation_ = null;
1376       if (cropHintsAnnotationBuilder_ != null) {
1377         cropHintsAnnotationBuilder_.dispose();
1378         cropHintsAnnotationBuilder_ = null;
1379       }
1380       webDetection_ = null;
1381       if (webDetectionBuilder_ != null) {
1382         webDetectionBuilder_.dispose();
1383         webDetectionBuilder_ = null;
1384       }
1385       productSearchResults_ = null;
1386       if (productSearchResultsBuilder_ != null) {
1387         productSearchResultsBuilder_.dispose();
1388         productSearchResultsBuilder_ = null;
1389       }
1390       error_ = null;
1391       if (errorBuilder_ != null) {
1392         errorBuilder_.dispose();
1393         errorBuilder_ = null;
1394       }
1395       context_ = null;
1396       if (contextBuilder_ != null) {
1397         contextBuilder_.dispose();
1398         contextBuilder_ = null;
1399       }
1400       return this;
1401     }
1402 
1403     @java.lang.Override
getDescriptorForType()1404     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1405       return com.google.cloud.vision.v1.ImageAnnotatorProto
1406           .internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
1407     }
1408 
1409     @java.lang.Override
getDefaultInstanceForType()1410     public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() {
1411       return com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance();
1412     }
1413 
1414     @java.lang.Override
build()1415     public com.google.cloud.vision.v1.AnnotateImageResponse build() {
1416       com.google.cloud.vision.v1.AnnotateImageResponse result = buildPartial();
1417       if (!result.isInitialized()) {
1418         throw newUninitializedMessageException(result);
1419       }
1420       return result;
1421     }
1422 
1423     @java.lang.Override
buildPartial()1424     public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() {
1425       com.google.cloud.vision.v1.AnnotateImageResponse result =
1426           new com.google.cloud.vision.v1.AnnotateImageResponse(this);
1427       buildPartialRepeatedFields(result);
1428       if (bitField0_ != 0) {
1429         buildPartial0(result);
1430       }
1431       onBuilt();
1432       return result;
1433     }
1434 
buildPartialRepeatedFields( com.google.cloud.vision.v1.AnnotateImageResponse result)1435     private void buildPartialRepeatedFields(
1436         com.google.cloud.vision.v1.AnnotateImageResponse result) {
1437       if (faceAnnotationsBuilder_ == null) {
1438         if (((bitField0_ & 0x00000001) != 0)) {
1439           faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_);
1440           bitField0_ = (bitField0_ & ~0x00000001);
1441         }
1442         result.faceAnnotations_ = faceAnnotations_;
1443       } else {
1444         result.faceAnnotations_ = faceAnnotationsBuilder_.build();
1445       }
1446       if (landmarkAnnotationsBuilder_ == null) {
1447         if (((bitField0_ & 0x00000002) != 0)) {
1448           landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_);
1449           bitField0_ = (bitField0_ & ~0x00000002);
1450         }
1451         result.landmarkAnnotations_ = landmarkAnnotations_;
1452       } else {
1453         result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build();
1454       }
1455       if (logoAnnotationsBuilder_ == null) {
1456         if (((bitField0_ & 0x00000004) != 0)) {
1457           logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_);
1458           bitField0_ = (bitField0_ & ~0x00000004);
1459         }
1460         result.logoAnnotations_ = logoAnnotations_;
1461       } else {
1462         result.logoAnnotations_ = logoAnnotationsBuilder_.build();
1463       }
1464       if (labelAnnotationsBuilder_ == null) {
1465         if (((bitField0_ & 0x00000008) != 0)) {
1466           labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_);
1467           bitField0_ = (bitField0_ & ~0x00000008);
1468         }
1469         result.labelAnnotations_ = labelAnnotations_;
1470       } else {
1471         result.labelAnnotations_ = labelAnnotationsBuilder_.build();
1472       }
1473       if (localizedObjectAnnotationsBuilder_ == null) {
1474         if (((bitField0_ & 0x00000010) != 0)) {
1475           localizedObjectAnnotations_ =
1476               java.util.Collections.unmodifiableList(localizedObjectAnnotations_);
1477           bitField0_ = (bitField0_ & ~0x00000010);
1478         }
1479         result.localizedObjectAnnotations_ = localizedObjectAnnotations_;
1480       } else {
1481         result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build();
1482       }
1483       if (textAnnotationsBuilder_ == null) {
1484         if (((bitField0_ & 0x00000020) != 0)) {
1485           textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_);
1486           bitField0_ = (bitField0_ & ~0x00000020);
1487         }
1488         result.textAnnotations_ = textAnnotations_;
1489       } else {
1490         result.textAnnotations_ = textAnnotationsBuilder_.build();
1491       }
1492     }
1493 
buildPartial0(com.google.cloud.vision.v1.AnnotateImageResponse result)1494     private void buildPartial0(com.google.cloud.vision.v1.AnnotateImageResponse result) {
1495       int from_bitField0_ = bitField0_;
1496       if (((from_bitField0_ & 0x00000040) != 0)) {
1497         result.fullTextAnnotation_ =
1498             fullTextAnnotationBuilder_ == null
1499                 ? fullTextAnnotation_
1500                 : fullTextAnnotationBuilder_.build();
1501       }
1502       if (((from_bitField0_ & 0x00000080) != 0)) {
1503         result.safeSearchAnnotation_ =
1504             safeSearchAnnotationBuilder_ == null
1505                 ? safeSearchAnnotation_
1506                 : safeSearchAnnotationBuilder_.build();
1507       }
1508       if (((from_bitField0_ & 0x00000100) != 0)) {
1509         result.imagePropertiesAnnotation_ =
1510             imagePropertiesAnnotationBuilder_ == null
1511                 ? imagePropertiesAnnotation_
1512                 : imagePropertiesAnnotationBuilder_.build();
1513       }
1514       if (((from_bitField0_ & 0x00000200) != 0)) {
1515         result.cropHintsAnnotation_ =
1516             cropHintsAnnotationBuilder_ == null
1517                 ? cropHintsAnnotation_
1518                 : cropHintsAnnotationBuilder_.build();
1519       }
1520       if (((from_bitField0_ & 0x00000400) != 0)) {
1521         result.webDetection_ =
1522             webDetectionBuilder_ == null ? webDetection_ : webDetectionBuilder_.build();
1523       }
1524       if (((from_bitField0_ & 0x00000800) != 0)) {
1525         result.productSearchResults_ =
1526             productSearchResultsBuilder_ == null
1527                 ? productSearchResults_
1528                 : productSearchResultsBuilder_.build();
1529       }
1530       if (((from_bitField0_ & 0x00001000) != 0)) {
1531         result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build();
1532       }
1533       if (((from_bitField0_ & 0x00002000) != 0)) {
1534         result.context_ = contextBuilder_ == null ? context_ : contextBuilder_.build();
1535       }
1536     }
1537 
1538     @java.lang.Override
clone()1539     public Builder clone() {
1540       return super.clone();
1541     }
1542 
1543     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1544     public Builder setField(
1545         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1546       return super.setField(field, value);
1547     }
1548 
1549     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1550     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1551       return super.clearField(field);
1552     }
1553 
1554     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1555     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1556       return super.clearOneof(oneof);
1557     }
1558 
1559     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1560     public Builder setRepeatedField(
1561         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1562       return super.setRepeatedField(field, index, value);
1563     }
1564 
1565     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1566     public Builder addRepeatedField(
1567         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1568       return super.addRepeatedField(field, value);
1569     }
1570 
1571     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1572     public Builder mergeFrom(com.google.protobuf.Message other) {
1573       if (other instanceof com.google.cloud.vision.v1.AnnotateImageResponse) {
1574         return mergeFrom((com.google.cloud.vision.v1.AnnotateImageResponse) other);
1575       } else {
1576         super.mergeFrom(other);
1577         return this;
1578       }
1579     }
1580 
mergeFrom(com.google.cloud.vision.v1.AnnotateImageResponse other)1581     public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageResponse other) {
1582       if (other == com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance())
1583         return this;
1584       if (faceAnnotationsBuilder_ == null) {
1585         if (!other.faceAnnotations_.isEmpty()) {
1586           if (faceAnnotations_.isEmpty()) {
1587             faceAnnotations_ = other.faceAnnotations_;
1588             bitField0_ = (bitField0_ & ~0x00000001);
1589           } else {
1590             ensureFaceAnnotationsIsMutable();
1591             faceAnnotations_.addAll(other.faceAnnotations_);
1592           }
1593           onChanged();
1594         }
1595       } else {
1596         if (!other.faceAnnotations_.isEmpty()) {
1597           if (faceAnnotationsBuilder_.isEmpty()) {
1598             faceAnnotationsBuilder_.dispose();
1599             faceAnnotationsBuilder_ = null;
1600             faceAnnotations_ = other.faceAnnotations_;
1601             bitField0_ = (bitField0_ & ~0x00000001);
1602             faceAnnotationsBuilder_ =
1603                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1604                     ? getFaceAnnotationsFieldBuilder()
1605                     : null;
1606           } else {
1607             faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_);
1608           }
1609         }
1610       }
1611       if (landmarkAnnotationsBuilder_ == null) {
1612         if (!other.landmarkAnnotations_.isEmpty()) {
1613           if (landmarkAnnotations_.isEmpty()) {
1614             landmarkAnnotations_ = other.landmarkAnnotations_;
1615             bitField0_ = (bitField0_ & ~0x00000002);
1616           } else {
1617             ensureLandmarkAnnotationsIsMutable();
1618             landmarkAnnotations_.addAll(other.landmarkAnnotations_);
1619           }
1620           onChanged();
1621         }
1622       } else {
1623         if (!other.landmarkAnnotations_.isEmpty()) {
1624           if (landmarkAnnotationsBuilder_.isEmpty()) {
1625             landmarkAnnotationsBuilder_.dispose();
1626             landmarkAnnotationsBuilder_ = null;
1627             landmarkAnnotations_ = other.landmarkAnnotations_;
1628             bitField0_ = (bitField0_ & ~0x00000002);
1629             landmarkAnnotationsBuilder_ =
1630                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1631                     ? getLandmarkAnnotationsFieldBuilder()
1632                     : null;
1633           } else {
1634             landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_);
1635           }
1636         }
1637       }
1638       if (logoAnnotationsBuilder_ == null) {
1639         if (!other.logoAnnotations_.isEmpty()) {
1640           if (logoAnnotations_.isEmpty()) {
1641             logoAnnotations_ = other.logoAnnotations_;
1642             bitField0_ = (bitField0_ & ~0x00000004);
1643           } else {
1644             ensureLogoAnnotationsIsMutable();
1645             logoAnnotations_.addAll(other.logoAnnotations_);
1646           }
1647           onChanged();
1648         }
1649       } else {
1650         if (!other.logoAnnotations_.isEmpty()) {
1651           if (logoAnnotationsBuilder_.isEmpty()) {
1652             logoAnnotationsBuilder_.dispose();
1653             logoAnnotationsBuilder_ = null;
1654             logoAnnotations_ = other.logoAnnotations_;
1655             bitField0_ = (bitField0_ & ~0x00000004);
1656             logoAnnotationsBuilder_ =
1657                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1658                     ? getLogoAnnotationsFieldBuilder()
1659                     : null;
1660           } else {
1661             logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_);
1662           }
1663         }
1664       }
1665       if (labelAnnotationsBuilder_ == null) {
1666         if (!other.labelAnnotations_.isEmpty()) {
1667           if (labelAnnotations_.isEmpty()) {
1668             labelAnnotations_ = other.labelAnnotations_;
1669             bitField0_ = (bitField0_ & ~0x00000008);
1670           } else {
1671             ensureLabelAnnotationsIsMutable();
1672             labelAnnotations_.addAll(other.labelAnnotations_);
1673           }
1674           onChanged();
1675         }
1676       } else {
1677         if (!other.labelAnnotations_.isEmpty()) {
1678           if (labelAnnotationsBuilder_.isEmpty()) {
1679             labelAnnotationsBuilder_.dispose();
1680             labelAnnotationsBuilder_ = null;
1681             labelAnnotations_ = other.labelAnnotations_;
1682             bitField0_ = (bitField0_ & ~0x00000008);
1683             labelAnnotationsBuilder_ =
1684                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1685                     ? getLabelAnnotationsFieldBuilder()
1686                     : null;
1687           } else {
1688             labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_);
1689           }
1690         }
1691       }
1692       if (localizedObjectAnnotationsBuilder_ == null) {
1693         if (!other.localizedObjectAnnotations_.isEmpty()) {
1694           if (localizedObjectAnnotations_.isEmpty()) {
1695             localizedObjectAnnotations_ = other.localizedObjectAnnotations_;
1696             bitField0_ = (bitField0_ & ~0x00000010);
1697           } else {
1698             ensureLocalizedObjectAnnotationsIsMutable();
1699             localizedObjectAnnotations_.addAll(other.localizedObjectAnnotations_);
1700           }
1701           onChanged();
1702         }
1703       } else {
1704         if (!other.localizedObjectAnnotations_.isEmpty()) {
1705           if (localizedObjectAnnotationsBuilder_.isEmpty()) {
1706             localizedObjectAnnotationsBuilder_.dispose();
1707             localizedObjectAnnotationsBuilder_ = null;
1708             localizedObjectAnnotations_ = other.localizedObjectAnnotations_;
1709             bitField0_ = (bitField0_ & ~0x00000010);
1710             localizedObjectAnnotationsBuilder_ =
1711                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1712                     ? getLocalizedObjectAnnotationsFieldBuilder()
1713                     : null;
1714           } else {
1715             localizedObjectAnnotationsBuilder_.addAllMessages(other.localizedObjectAnnotations_);
1716           }
1717         }
1718       }
1719       if (textAnnotationsBuilder_ == null) {
1720         if (!other.textAnnotations_.isEmpty()) {
1721           if (textAnnotations_.isEmpty()) {
1722             textAnnotations_ = other.textAnnotations_;
1723             bitField0_ = (bitField0_ & ~0x00000020);
1724           } else {
1725             ensureTextAnnotationsIsMutable();
1726             textAnnotations_.addAll(other.textAnnotations_);
1727           }
1728           onChanged();
1729         }
1730       } else {
1731         if (!other.textAnnotations_.isEmpty()) {
1732           if (textAnnotationsBuilder_.isEmpty()) {
1733             textAnnotationsBuilder_.dispose();
1734             textAnnotationsBuilder_ = null;
1735             textAnnotations_ = other.textAnnotations_;
1736             bitField0_ = (bitField0_ & ~0x00000020);
1737             textAnnotationsBuilder_ =
1738                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1739                     ? getTextAnnotationsFieldBuilder()
1740                     : null;
1741           } else {
1742             textAnnotationsBuilder_.addAllMessages(other.textAnnotations_);
1743           }
1744         }
1745       }
1746       if (other.hasFullTextAnnotation()) {
1747         mergeFullTextAnnotation(other.getFullTextAnnotation());
1748       }
1749       if (other.hasSafeSearchAnnotation()) {
1750         mergeSafeSearchAnnotation(other.getSafeSearchAnnotation());
1751       }
1752       if (other.hasImagePropertiesAnnotation()) {
1753         mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation());
1754       }
1755       if (other.hasCropHintsAnnotation()) {
1756         mergeCropHintsAnnotation(other.getCropHintsAnnotation());
1757       }
1758       if (other.hasWebDetection()) {
1759         mergeWebDetection(other.getWebDetection());
1760       }
1761       if (other.hasProductSearchResults()) {
1762         mergeProductSearchResults(other.getProductSearchResults());
1763       }
1764       if (other.hasError()) {
1765         mergeError(other.getError());
1766       }
1767       if (other.hasContext()) {
1768         mergeContext(other.getContext());
1769       }
1770       this.mergeUnknownFields(other.getUnknownFields());
1771       onChanged();
1772       return this;
1773     }
1774 
1775     @java.lang.Override
isInitialized()1776     public final boolean isInitialized() {
1777       return true;
1778     }
1779 
1780     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1781     public Builder mergeFrom(
1782         com.google.protobuf.CodedInputStream input,
1783         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1784         throws java.io.IOException {
1785       if (extensionRegistry == null) {
1786         throw new java.lang.NullPointerException();
1787       }
1788       try {
1789         boolean done = false;
1790         while (!done) {
1791           int tag = input.readTag();
1792           switch (tag) {
1793             case 0:
1794               done = true;
1795               break;
1796             case 10:
1797               {
1798                 com.google.cloud.vision.v1.FaceAnnotation m =
1799                     input.readMessage(
1800                         com.google.cloud.vision.v1.FaceAnnotation.parser(), extensionRegistry);
1801                 if (faceAnnotationsBuilder_ == null) {
1802                   ensureFaceAnnotationsIsMutable();
1803                   faceAnnotations_.add(m);
1804                 } else {
1805                   faceAnnotationsBuilder_.addMessage(m);
1806                 }
1807                 break;
1808               } // case 10
1809             case 18:
1810               {
1811                 com.google.cloud.vision.v1.EntityAnnotation m =
1812                     input.readMessage(
1813                         com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry);
1814                 if (landmarkAnnotationsBuilder_ == null) {
1815                   ensureLandmarkAnnotationsIsMutable();
1816                   landmarkAnnotations_.add(m);
1817                 } else {
1818                   landmarkAnnotationsBuilder_.addMessage(m);
1819                 }
1820                 break;
1821               } // case 18
1822             case 26:
1823               {
1824                 com.google.cloud.vision.v1.EntityAnnotation m =
1825                     input.readMessage(
1826                         com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry);
1827                 if (logoAnnotationsBuilder_ == null) {
1828                   ensureLogoAnnotationsIsMutable();
1829                   logoAnnotations_.add(m);
1830                 } else {
1831                   logoAnnotationsBuilder_.addMessage(m);
1832                 }
1833                 break;
1834               } // case 26
1835             case 34:
1836               {
1837                 com.google.cloud.vision.v1.EntityAnnotation m =
1838                     input.readMessage(
1839                         com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry);
1840                 if (labelAnnotationsBuilder_ == null) {
1841                   ensureLabelAnnotationsIsMutable();
1842                   labelAnnotations_.add(m);
1843                 } else {
1844                   labelAnnotationsBuilder_.addMessage(m);
1845                 }
1846                 break;
1847               } // case 34
1848             case 42:
1849               {
1850                 com.google.cloud.vision.v1.EntityAnnotation m =
1851                     input.readMessage(
1852                         com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry);
1853                 if (textAnnotationsBuilder_ == null) {
1854                   ensureTextAnnotationsIsMutable();
1855                   textAnnotations_.add(m);
1856                 } else {
1857                   textAnnotationsBuilder_.addMessage(m);
1858                 }
1859                 break;
1860               } // case 42
1861             case 50:
1862               {
1863                 input.readMessage(
1864                     getSafeSearchAnnotationFieldBuilder().getBuilder(), extensionRegistry);
1865                 bitField0_ |= 0x00000080;
1866                 break;
1867               } // case 50
1868             case 66:
1869               {
1870                 input.readMessage(
1871                     getImagePropertiesAnnotationFieldBuilder().getBuilder(), extensionRegistry);
1872                 bitField0_ |= 0x00000100;
1873                 break;
1874               } // case 66
1875             case 74:
1876               {
1877                 input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry);
1878                 bitField0_ |= 0x00001000;
1879                 break;
1880               } // case 74
1881             case 90:
1882               {
1883                 input.readMessage(
1884                     getCropHintsAnnotationFieldBuilder().getBuilder(), extensionRegistry);
1885                 bitField0_ |= 0x00000200;
1886                 break;
1887               } // case 90
1888             case 98:
1889               {
1890                 input.readMessage(
1891                     getFullTextAnnotationFieldBuilder().getBuilder(), extensionRegistry);
1892                 bitField0_ |= 0x00000040;
1893                 break;
1894               } // case 98
1895             case 106:
1896               {
1897                 input.readMessage(getWebDetectionFieldBuilder().getBuilder(), extensionRegistry);
1898                 bitField0_ |= 0x00000400;
1899                 break;
1900               } // case 106
1901             case 114:
1902               {
1903                 input.readMessage(
1904                     getProductSearchResultsFieldBuilder().getBuilder(), extensionRegistry);
1905                 bitField0_ |= 0x00000800;
1906                 break;
1907               } // case 114
1908             case 170:
1909               {
1910                 input.readMessage(getContextFieldBuilder().getBuilder(), extensionRegistry);
1911                 bitField0_ |= 0x00002000;
1912                 break;
1913               } // case 170
1914             case 178:
1915               {
1916                 com.google.cloud.vision.v1.LocalizedObjectAnnotation m =
1917                     input.readMessage(
1918                         com.google.cloud.vision.v1.LocalizedObjectAnnotation.parser(),
1919                         extensionRegistry);
1920                 if (localizedObjectAnnotationsBuilder_ == null) {
1921                   ensureLocalizedObjectAnnotationsIsMutable();
1922                   localizedObjectAnnotations_.add(m);
1923                 } else {
1924                   localizedObjectAnnotationsBuilder_.addMessage(m);
1925                 }
1926                 break;
1927               } // case 178
1928             default:
1929               {
1930                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1931                   done = true; // was an endgroup tag
1932                 }
1933                 break;
1934               } // default:
1935           } // switch (tag)
1936         } // while (!done)
1937       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1938         throw e.unwrapIOException();
1939       } finally {
1940         onChanged();
1941       } // finally
1942       return this;
1943     }
1944 
1945     private int bitField0_;
1946 
1947     private java.util.List<com.google.cloud.vision.v1.FaceAnnotation> faceAnnotations_ =
1948         java.util.Collections.emptyList();
1949 
ensureFaceAnnotationsIsMutable()1950     private void ensureFaceAnnotationsIsMutable() {
1951       if (!((bitField0_ & 0x00000001) != 0)) {
1952         faceAnnotations_ =
1953             new java.util.ArrayList<com.google.cloud.vision.v1.FaceAnnotation>(faceAnnotations_);
1954         bitField0_ |= 0x00000001;
1955       }
1956     }
1957 
1958     private com.google.protobuf.RepeatedFieldBuilderV3<
1959             com.google.cloud.vision.v1.FaceAnnotation,
1960             com.google.cloud.vision.v1.FaceAnnotation.Builder,
1961             com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
1962         faceAnnotationsBuilder_;
1963 
1964     /**
1965      *
1966      *
1967      * <pre>
1968      * If present, face detection has completed successfully.
1969      * </pre>
1970      *
1971      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
1972      */
getFaceAnnotationsList()1973     public java.util.List<com.google.cloud.vision.v1.FaceAnnotation> getFaceAnnotationsList() {
1974       if (faceAnnotationsBuilder_ == null) {
1975         return java.util.Collections.unmodifiableList(faceAnnotations_);
1976       } else {
1977         return faceAnnotationsBuilder_.getMessageList();
1978       }
1979     }
1980     /**
1981      *
1982      *
1983      * <pre>
1984      * If present, face detection has completed successfully.
1985      * </pre>
1986      *
1987      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
1988      */
getFaceAnnotationsCount()1989     public int getFaceAnnotationsCount() {
1990       if (faceAnnotationsBuilder_ == null) {
1991         return faceAnnotations_.size();
1992       } else {
1993         return faceAnnotationsBuilder_.getCount();
1994       }
1995     }
1996     /**
1997      *
1998      *
1999      * <pre>
2000      * If present, face detection has completed successfully.
2001      * </pre>
2002      *
2003      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2004      */
getFaceAnnotations(int index)2005     public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) {
2006       if (faceAnnotationsBuilder_ == null) {
2007         return faceAnnotations_.get(index);
2008       } else {
2009         return faceAnnotationsBuilder_.getMessage(index);
2010       }
2011     }
2012     /**
2013      *
2014      *
2015      * <pre>
2016      * If present, face detection has completed successfully.
2017      * </pre>
2018      *
2019      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2020      */
setFaceAnnotations(int index, com.google.cloud.vision.v1.FaceAnnotation value)2021     public Builder setFaceAnnotations(int index, com.google.cloud.vision.v1.FaceAnnotation value) {
2022       if (faceAnnotationsBuilder_ == null) {
2023         if (value == null) {
2024           throw new NullPointerException();
2025         }
2026         ensureFaceAnnotationsIsMutable();
2027         faceAnnotations_.set(index, value);
2028         onChanged();
2029       } else {
2030         faceAnnotationsBuilder_.setMessage(index, value);
2031       }
2032       return this;
2033     }
2034     /**
2035      *
2036      *
2037      * <pre>
2038      * If present, face detection has completed successfully.
2039      * </pre>
2040      *
2041      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2042      */
setFaceAnnotations( int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue)2043     public Builder setFaceAnnotations(
2044         int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
2045       if (faceAnnotationsBuilder_ == null) {
2046         ensureFaceAnnotationsIsMutable();
2047         faceAnnotations_.set(index, builderForValue.build());
2048         onChanged();
2049       } else {
2050         faceAnnotationsBuilder_.setMessage(index, builderForValue.build());
2051       }
2052       return this;
2053     }
2054     /**
2055      *
2056      *
2057      * <pre>
2058      * If present, face detection has completed successfully.
2059      * </pre>
2060      *
2061      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2062      */
addFaceAnnotations(com.google.cloud.vision.v1.FaceAnnotation value)2063     public Builder addFaceAnnotations(com.google.cloud.vision.v1.FaceAnnotation value) {
2064       if (faceAnnotationsBuilder_ == null) {
2065         if (value == null) {
2066           throw new NullPointerException();
2067         }
2068         ensureFaceAnnotationsIsMutable();
2069         faceAnnotations_.add(value);
2070         onChanged();
2071       } else {
2072         faceAnnotationsBuilder_.addMessage(value);
2073       }
2074       return this;
2075     }
2076     /**
2077      *
2078      *
2079      * <pre>
2080      * If present, face detection has completed successfully.
2081      * </pre>
2082      *
2083      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2084      */
addFaceAnnotations(int index, com.google.cloud.vision.v1.FaceAnnotation value)2085     public Builder addFaceAnnotations(int index, com.google.cloud.vision.v1.FaceAnnotation value) {
2086       if (faceAnnotationsBuilder_ == null) {
2087         if (value == null) {
2088           throw new NullPointerException();
2089         }
2090         ensureFaceAnnotationsIsMutable();
2091         faceAnnotations_.add(index, value);
2092         onChanged();
2093       } else {
2094         faceAnnotationsBuilder_.addMessage(index, value);
2095       }
2096       return this;
2097     }
2098     /**
2099      *
2100      *
2101      * <pre>
2102      * If present, face detection has completed successfully.
2103      * </pre>
2104      *
2105      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2106      */
addFaceAnnotations( com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue)2107     public Builder addFaceAnnotations(
2108         com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
2109       if (faceAnnotationsBuilder_ == null) {
2110         ensureFaceAnnotationsIsMutable();
2111         faceAnnotations_.add(builderForValue.build());
2112         onChanged();
2113       } else {
2114         faceAnnotationsBuilder_.addMessage(builderForValue.build());
2115       }
2116       return this;
2117     }
2118     /**
2119      *
2120      *
2121      * <pre>
2122      * If present, face detection has completed successfully.
2123      * </pre>
2124      *
2125      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2126      */
addFaceAnnotations( int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue)2127     public Builder addFaceAnnotations(
2128         int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
2129       if (faceAnnotationsBuilder_ == null) {
2130         ensureFaceAnnotationsIsMutable();
2131         faceAnnotations_.add(index, builderForValue.build());
2132         onChanged();
2133       } else {
2134         faceAnnotationsBuilder_.addMessage(index, builderForValue.build());
2135       }
2136       return this;
2137     }
2138     /**
2139      *
2140      *
2141      * <pre>
2142      * If present, face detection has completed successfully.
2143      * </pre>
2144      *
2145      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2146      */
addAllFaceAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.FaceAnnotation> values)2147     public Builder addAllFaceAnnotations(
2148         java.lang.Iterable<? extends com.google.cloud.vision.v1.FaceAnnotation> values) {
2149       if (faceAnnotationsBuilder_ == null) {
2150         ensureFaceAnnotationsIsMutable();
2151         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, faceAnnotations_);
2152         onChanged();
2153       } else {
2154         faceAnnotationsBuilder_.addAllMessages(values);
2155       }
2156       return this;
2157     }
2158     /**
2159      *
2160      *
2161      * <pre>
2162      * If present, face detection has completed successfully.
2163      * </pre>
2164      *
2165      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2166      */
clearFaceAnnotations()2167     public Builder clearFaceAnnotations() {
2168       if (faceAnnotationsBuilder_ == null) {
2169         faceAnnotations_ = java.util.Collections.emptyList();
2170         bitField0_ = (bitField0_ & ~0x00000001);
2171         onChanged();
2172       } else {
2173         faceAnnotationsBuilder_.clear();
2174       }
2175       return this;
2176     }
2177     /**
2178      *
2179      *
2180      * <pre>
2181      * If present, face detection has completed successfully.
2182      * </pre>
2183      *
2184      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2185      */
removeFaceAnnotations(int index)2186     public Builder removeFaceAnnotations(int index) {
2187       if (faceAnnotationsBuilder_ == null) {
2188         ensureFaceAnnotationsIsMutable();
2189         faceAnnotations_.remove(index);
2190         onChanged();
2191       } else {
2192         faceAnnotationsBuilder_.remove(index);
2193       }
2194       return this;
2195     }
2196     /**
2197      *
2198      *
2199      * <pre>
2200      * If present, face detection has completed successfully.
2201      * </pre>
2202      *
2203      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2204      */
getFaceAnnotationsBuilder(int index)2205     public com.google.cloud.vision.v1.FaceAnnotation.Builder getFaceAnnotationsBuilder(int index) {
2206       return getFaceAnnotationsFieldBuilder().getBuilder(index);
2207     }
2208     /**
2209      *
2210      *
2211      * <pre>
2212      * If present, face detection has completed successfully.
2213      * </pre>
2214      *
2215      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2216      */
getFaceAnnotationsOrBuilder( int index)2217     public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(
2218         int index) {
2219       if (faceAnnotationsBuilder_ == null) {
2220         return faceAnnotations_.get(index);
2221       } else {
2222         return faceAnnotationsBuilder_.getMessageOrBuilder(index);
2223       }
2224     }
2225     /**
2226      *
2227      *
2228      * <pre>
2229      * If present, face detection has completed successfully.
2230      * </pre>
2231      *
2232      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2233      */
2234     public java.util.List<? extends com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsOrBuilderList()2235         getFaceAnnotationsOrBuilderList() {
2236       if (faceAnnotationsBuilder_ != null) {
2237         return faceAnnotationsBuilder_.getMessageOrBuilderList();
2238       } else {
2239         return java.util.Collections.unmodifiableList(faceAnnotations_);
2240       }
2241     }
2242     /**
2243      *
2244      *
2245      * <pre>
2246      * If present, face detection has completed successfully.
2247      * </pre>
2248      *
2249      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2250      */
addFaceAnnotationsBuilder()2251     public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder() {
2252       return getFaceAnnotationsFieldBuilder()
2253           .addBuilder(com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance());
2254     }
2255     /**
2256      *
2257      *
2258      * <pre>
2259      * If present, face detection has completed successfully.
2260      * </pre>
2261      *
2262      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2263      */
addFaceAnnotationsBuilder(int index)2264     public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder(int index) {
2265       return getFaceAnnotationsFieldBuilder()
2266           .addBuilder(index, com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance());
2267     }
2268     /**
2269      *
2270      *
2271      * <pre>
2272      * If present, face detection has completed successfully.
2273      * </pre>
2274      *
2275      * <code>repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;</code>
2276      */
2277     public java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Builder>
getFaceAnnotationsBuilderList()2278         getFaceAnnotationsBuilderList() {
2279       return getFaceAnnotationsFieldBuilder().getBuilderList();
2280     }
2281 
2282     private com.google.protobuf.RepeatedFieldBuilderV3<
2283             com.google.cloud.vision.v1.FaceAnnotation,
2284             com.google.cloud.vision.v1.FaceAnnotation.Builder,
2285             com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsFieldBuilder()2286         getFaceAnnotationsFieldBuilder() {
2287       if (faceAnnotationsBuilder_ == null) {
2288         faceAnnotationsBuilder_ =
2289             new com.google.protobuf.RepeatedFieldBuilderV3<
2290                 com.google.cloud.vision.v1.FaceAnnotation,
2291                 com.google.cloud.vision.v1.FaceAnnotation.Builder,
2292                 com.google.cloud.vision.v1.FaceAnnotationOrBuilder>(
2293                 faceAnnotations_,
2294                 ((bitField0_ & 0x00000001) != 0),
2295                 getParentForChildren(),
2296                 isClean());
2297         faceAnnotations_ = null;
2298       }
2299       return faceAnnotationsBuilder_;
2300     }
2301 
2302     private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> landmarkAnnotations_ =
2303         java.util.Collections.emptyList();
2304 
ensureLandmarkAnnotationsIsMutable()2305     private void ensureLandmarkAnnotationsIsMutable() {
2306       if (!((bitField0_ & 0x00000002) != 0)) {
2307         landmarkAnnotations_ =
2308             new java.util.ArrayList<com.google.cloud.vision.v1.EntityAnnotation>(
2309                 landmarkAnnotations_);
2310         bitField0_ |= 0x00000002;
2311       }
2312     }
2313 
2314     private com.google.protobuf.RepeatedFieldBuilderV3<
2315             com.google.cloud.vision.v1.EntityAnnotation,
2316             com.google.cloud.vision.v1.EntityAnnotation.Builder,
2317             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
2318         landmarkAnnotationsBuilder_;
2319 
2320     /**
2321      *
2322      *
2323      * <pre>
2324      * If present, landmark detection has completed successfully.
2325      * </pre>
2326      *
2327      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2328      */
2329     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation>
getLandmarkAnnotationsList()2330         getLandmarkAnnotationsList() {
2331       if (landmarkAnnotationsBuilder_ == null) {
2332         return java.util.Collections.unmodifiableList(landmarkAnnotations_);
2333       } else {
2334         return landmarkAnnotationsBuilder_.getMessageList();
2335       }
2336     }
2337     /**
2338      *
2339      *
2340      * <pre>
2341      * If present, landmark detection has completed successfully.
2342      * </pre>
2343      *
2344      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2345      */
getLandmarkAnnotationsCount()2346     public int getLandmarkAnnotationsCount() {
2347       if (landmarkAnnotationsBuilder_ == null) {
2348         return landmarkAnnotations_.size();
2349       } else {
2350         return landmarkAnnotationsBuilder_.getCount();
2351       }
2352     }
2353     /**
2354      *
2355      *
2356      * <pre>
2357      * If present, landmark detection has completed successfully.
2358      * </pre>
2359      *
2360      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2361      */
getLandmarkAnnotations(int index)2362     public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) {
2363       if (landmarkAnnotationsBuilder_ == null) {
2364         return landmarkAnnotations_.get(index);
2365       } else {
2366         return landmarkAnnotationsBuilder_.getMessage(index);
2367       }
2368     }
2369     /**
2370      *
2371      *
2372      * <pre>
2373      * If present, landmark detection has completed successfully.
2374      * </pre>
2375      *
2376      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2377      */
setLandmarkAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)2378     public Builder setLandmarkAnnotations(
2379         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
2380       if (landmarkAnnotationsBuilder_ == null) {
2381         if (value == null) {
2382           throw new NullPointerException();
2383         }
2384         ensureLandmarkAnnotationsIsMutable();
2385         landmarkAnnotations_.set(index, value);
2386         onChanged();
2387       } else {
2388         landmarkAnnotationsBuilder_.setMessage(index, value);
2389       }
2390       return this;
2391     }
2392     /**
2393      *
2394      *
2395      * <pre>
2396      * If present, landmark detection has completed successfully.
2397      * </pre>
2398      *
2399      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2400      */
setLandmarkAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2401     public Builder setLandmarkAnnotations(
2402         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2403       if (landmarkAnnotationsBuilder_ == null) {
2404         ensureLandmarkAnnotationsIsMutable();
2405         landmarkAnnotations_.set(index, builderForValue.build());
2406         onChanged();
2407       } else {
2408         landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build());
2409       }
2410       return this;
2411     }
2412     /**
2413      *
2414      *
2415      * <pre>
2416      * If present, landmark detection has completed successfully.
2417      * </pre>
2418      *
2419      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2420      */
addLandmarkAnnotations(com.google.cloud.vision.v1.EntityAnnotation value)2421     public Builder addLandmarkAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
2422       if (landmarkAnnotationsBuilder_ == null) {
2423         if (value == null) {
2424           throw new NullPointerException();
2425         }
2426         ensureLandmarkAnnotationsIsMutable();
2427         landmarkAnnotations_.add(value);
2428         onChanged();
2429       } else {
2430         landmarkAnnotationsBuilder_.addMessage(value);
2431       }
2432       return this;
2433     }
2434     /**
2435      *
2436      *
2437      * <pre>
2438      * If present, landmark detection has completed successfully.
2439      * </pre>
2440      *
2441      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2442      */
addLandmarkAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)2443     public Builder addLandmarkAnnotations(
2444         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
2445       if (landmarkAnnotationsBuilder_ == null) {
2446         if (value == null) {
2447           throw new NullPointerException();
2448         }
2449         ensureLandmarkAnnotationsIsMutable();
2450         landmarkAnnotations_.add(index, value);
2451         onChanged();
2452       } else {
2453         landmarkAnnotationsBuilder_.addMessage(index, value);
2454       }
2455       return this;
2456     }
2457     /**
2458      *
2459      *
2460      * <pre>
2461      * If present, landmark detection has completed successfully.
2462      * </pre>
2463      *
2464      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2465      */
addLandmarkAnnotations( com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2466     public Builder addLandmarkAnnotations(
2467         com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2468       if (landmarkAnnotationsBuilder_ == null) {
2469         ensureLandmarkAnnotationsIsMutable();
2470         landmarkAnnotations_.add(builderForValue.build());
2471         onChanged();
2472       } else {
2473         landmarkAnnotationsBuilder_.addMessage(builderForValue.build());
2474       }
2475       return this;
2476     }
2477     /**
2478      *
2479      *
2480      * <pre>
2481      * If present, landmark detection has completed successfully.
2482      * </pre>
2483      *
2484      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2485      */
addLandmarkAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2486     public Builder addLandmarkAnnotations(
2487         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2488       if (landmarkAnnotationsBuilder_ == null) {
2489         ensureLandmarkAnnotationsIsMutable();
2490         landmarkAnnotations_.add(index, builderForValue.build());
2491         onChanged();
2492       } else {
2493         landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build());
2494       }
2495       return this;
2496     }
2497     /**
2498      *
2499      *
2500      * <pre>
2501      * If present, landmark detection has completed successfully.
2502      * </pre>
2503      *
2504      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2505      */
addAllLandmarkAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values)2506     public Builder addAllLandmarkAnnotations(
2507         java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values) {
2508       if (landmarkAnnotationsBuilder_ == null) {
2509         ensureLandmarkAnnotationsIsMutable();
2510         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarkAnnotations_);
2511         onChanged();
2512       } else {
2513         landmarkAnnotationsBuilder_.addAllMessages(values);
2514       }
2515       return this;
2516     }
2517     /**
2518      *
2519      *
2520      * <pre>
2521      * If present, landmark detection has completed successfully.
2522      * </pre>
2523      *
2524      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2525      */
clearLandmarkAnnotations()2526     public Builder clearLandmarkAnnotations() {
2527       if (landmarkAnnotationsBuilder_ == null) {
2528         landmarkAnnotations_ = java.util.Collections.emptyList();
2529         bitField0_ = (bitField0_ & ~0x00000002);
2530         onChanged();
2531       } else {
2532         landmarkAnnotationsBuilder_.clear();
2533       }
2534       return this;
2535     }
2536     /**
2537      *
2538      *
2539      * <pre>
2540      * If present, landmark detection has completed successfully.
2541      * </pre>
2542      *
2543      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2544      */
removeLandmarkAnnotations(int index)2545     public Builder removeLandmarkAnnotations(int index) {
2546       if (landmarkAnnotationsBuilder_ == null) {
2547         ensureLandmarkAnnotationsIsMutable();
2548         landmarkAnnotations_.remove(index);
2549         onChanged();
2550       } else {
2551         landmarkAnnotationsBuilder_.remove(index);
2552       }
2553       return this;
2554     }
2555     /**
2556      *
2557      *
2558      * <pre>
2559      * If present, landmark detection has completed successfully.
2560      * </pre>
2561      *
2562      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2563      */
getLandmarkAnnotationsBuilder( int index)2564     public com.google.cloud.vision.v1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder(
2565         int index) {
2566       return getLandmarkAnnotationsFieldBuilder().getBuilder(index);
2567     }
2568     /**
2569      *
2570      *
2571      * <pre>
2572      * If present, landmark detection has completed successfully.
2573      * </pre>
2574      *
2575      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2576      */
getLandmarkAnnotationsOrBuilder( int index)2577     public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(
2578         int index) {
2579       if (landmarkAnnotationsBuilder_ == null) {
2580         return landmarkAnnotations_.get(index);
2581       } else {
2582         return landmarkAnnotationsBuilder_.getMessageOrBuilder(index);
2583       }
2584     }
2585     /**
2586      *
2587      *
2588      * <pre>
2589      * If present, landmark detection has completed successfully.
2590      * </pre>
2591      *
2592      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2593      */
2594     public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsOrBuilderList()2595         getLandmarkAnnotationsOrBuilderList() {
2596       if (landmarkAnnotationsBuilder_ != null) {
2597         return landmarkAnnotationsBuilder_.getMessageOrBuilderList();
2598       } else {
2599         return java.util.Collections.unmodifiableList(landmarkAnnotations_);
2600       }
2601     }
2602     /**
2603      *
2604      *
2605      * <pre>
2606      * If present, landmark detection has completed successfully.
2607      * </pre>
2608      *
2609      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2610      */
addLandmarkAnnotationsBuilder()2611     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() {
2612       return getLandmarkAnnotationsFieldBuilder()
2613           .addBuilder(com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
2614     }
2615     /**
2616      *
2617      *
2618      * <pre>
2619      * If present, landmark detection has completed successfully.
2620      * </pre>
2621      *
2622      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2623      */
addLandmarkAnnotationsBuilder( int index)2624     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder(
2625         int index) {
2626       return getLandmarkAnnotationsFieldBuilder()
2627           .addBuilder(index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
2628     }
2629     /**
2630      *
2631      *
2632      * <pre>
2633      * If present, landmark detection has completed successfully.
2634      * </pre>
2635      *
2636      * <code>repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;</code>
2637      */
2638     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation.Builder>
getLandmarkAnnotationsBuilderList()2639         getLandmarkAnnotationsBuilderList() {
2640       return getLandmarkAnnotationsFieldBuilder().getBuilderList();
2641     }
2642 
2643     private com.google.protobuf.RepeatedFieldBuilderV3<
2644             com.google.cloud.vision.v1.EntityAnnotation,
2645             com.google.cloud.vision.v1.EntityAnnotation.Builder,
2646             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsFieldBuilder()2647         getLandmarkAnnotationsFieldBuilder() {
2648       if (landmarkAnnotationsBuilder_ == null) {
2649         landmarkAnnotationsBuilder_ =
2650             new com.google.protobuf.RepeatedFieldBuilderV3<
2651                 com.google.cloud.vision.v1.EntityAnnotation,
2652                 com.google.cloud.vision.v1.EntityAnnotation.Builder,
2653                 com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
2654                 landmarkAnnotations_,
2655                 ((bitField0_ & 0x00000002) != 0),
2656                 getParentForChildren(),
2657                 isClean());
2658         landmarkAnnotations_ = null;
2659       }
2660       return landmarkAnnotationsBuilder_;
2661     }
2662 
2663     private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> logoAnnotations_ =
2664         java.util.Collections.emptyList();
2665 
ensureLogoAnnotationsIsMutable()2666     private void ensureLogoAnnotationsIsMutable() {
2667       if (!((bitField0_ & 0x00000004) != 0)) {
2668         logoAnnotations_ =
2669             new java.util.ArrayList<com.google.cloud.vision.v1.EntityAnnotation>(logoAnnotations_);
2670         bitField0_ |= 0x00000004;
2671       }
2672     }
2673 
2674     private com.google.protobuf.RepeatedFieldBuilderV3<
2675             com.google.cloud.vision.v1.EntityAnnotation,
2676             com.google.cloud.vision.v1.EntityAnnotation.Builder,
2677             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
2678         logoAnnotationsBuilder_;
2679 
2680     /**
2681      *
2682      *
2683      * <pre>
2684      * If present, logo detection has completed successfully.
2685      * </pre>
2686      *
2687      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2688      */
getLogoAnnotationsList()2689     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getLogoAnnotationsList() {
2690       if (logoAnnotationsBuilder_ == null) {
2691         return java.util.Collections.unmodifiableList(logoAnnotations_);
2692       } else {
2693         return logoAnnotationsBuilder_.getMessageList();
2694       }
2695     }
2696     /**
2697      *
2698      *
2699      * <pre>
2700      * If present, logo detection has completed successfully.
2701      * </pre>
2702      *
2703      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2704      */
getLogoAnnotationsCount()2705     public int getLogoAnnotationsCount() {
2706       if (logoAnnotationsBuilder_ == null) {
2707         return logoAnnotations_.size();
2708       } else {
2709         return logoAnnotationsBuilder_.getCount();
2710       }
2711     }
2712     /**
2713      *
2714      *
2715      * <pre>
2716      * If present, logo detection has completed successfully.
2717      * </pre>
2718      *
2719      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2720      */
getLogoAnnotations(int index)2721     public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) {
2722       if (logoAnnotationsBuilder_ == null) {
2723         return logoAnnotations_.get(index);
2724       } else {
2725         return logoAnnotationsBuilder_.getMessage(index);
2726       }
2727     }
2728     /**
2729      *
2730      *
2731      * <pre>
2732      * If present, logo detection has completed successfully.
2733      * </pre>
2734      *
2735      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2736      */
setLogoAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)2737     public Builder setLogoAnnotations(
2738         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
2739       if (logoAnnotationsBuilder_ == null) {
2740         if (value == null) {
2741           throw new NullPointerException();
2742         }
2743         ensureLogoAnnotationsIsMutable();
2744         logoAnnotations_.set(index, value);
2745         onChanged();
2746       } else {
2747         logoAnnotationsBuilder_.setMessage(index, value);
2748       }
2749       return this;
2750     }
2751     /**
2752      *
2753      *
2754      * <pre>
2755      * If present, logo detection has completed successfully.
2756      * </pre>
2757      *
2758      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2759      */
setLogoAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2760     public Builder setLogoAnnotations(
2761         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2762       if (logoAnnotationsBuilder_ == null) {
2763         ensureLogoAnnotationsIsMutable();
2764         logoAnnotations_.set(index, builderForValue.build());
2765         onChanged();
2766       } else {
2767         logoAnnotationsBuilder_.setMessage(index, builderForValue.build());
2768       }
2769       return this;
2770     }
2771     /**
2772      *
2773      *
2774      * <pre>
2775      * If present, logo detection has completed successfully.
2776      * </pre>
2777      *
2778      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2779      */
addLogoAnnotations(com.google.cloud.vision.v1.EntityAnnotation value)2780     public Builder addLogoAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
2781       if (logoAnnotationsBuilder_ == null) {
2782         if (value == null) {
2783           throw new NullPointerException();
2784         }
2785         ensureLogoAnnotationsIsMutable();
2786         logoAnnotations_.add(value);
2787         onChanged();
2788       } else {
2789         logoAnnotationsBuilder_.addMessage(value);
2790       }
2791       return this;
2792     }
2793     /**
2794      *
2795      *
2796      * <pre>
2797      * If present, logo detection has completed successfully.
2798      * </pre>
2799      *
2800      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2801      */
addLogoAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)2802     public Builder addLogoAnnotations(
2803         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
2804       if (logoAnnotationsBuilder_ == null) {
2805         if (value == null) {
2806           throw new NullPointerException();
2807         }
2808         ensureLogoAnnotationsIsMutable();
2809         logoAnnotations_.add(index, value);
2810         onChanged();
2811       } else {
2812         logoAnnotationsBuilder_.addMessage(index, value);
2813       }
2814       return this;
2815     }
2816     /**
2817      *
2818      *
2819      * <pre>
2820      * If present, logo detection has completed successfully.
2821      * </pre>
2822      *
2823      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2824      */
addLogoAnnotations( com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2825     public Builder addLogoAnnotations(
2826         com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2827       if (logoAnnotationsBuilder_ == null) {
2828         ensureLogoAnnotationsIsMutable();
2829         logoAnnotations_.add(builderForValue.build());
2830         onChanged();
2831       } else {
2832         logoAnnotationsBuilder_.addMessage(builderForValue.build());
2833       }
2834       return this;
2835     }
2836     /**
2837      *
2838      *
2839      * <pre>
2840      * If present, logo detection has completed successfully.
2841      * </pre>
2842      *
2843      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2844      */
addLogoAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)2845     public Builder addLogoAnnotations(
2846         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
2847       if (logoAnnotationsBuilder_ == null) {
2848         ensureLogoAnnotationsIsMutable();
2849         logoAnnotations_.add(index, builderForValue.build());
2850         onChanged();
2851       } else {
2852         logoAnnotationsBuilder_.addMessage(index, builderForValue.build());
2853       }
2854       return this;
2855     }
2856     /**
2857      *
2858      *
2859      * <pre>
2860      * If present, logo detection has completed successfully.
2861      * </pre>
2862      *
2863      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2864      */
addAllLogoAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values)2865     public Builder addAllLogoAnnotations(
2866         java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values) {
2867       if (logoAnnotationsBuilder_ == null) {
2868         ensureLogoAnnotationsIsMutable();
2869         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logoAnnotations_);
2870         onChanged();
2871       } else {
2872         logoAnnotationsBuilder_.addAllMessages(values);
2873       }
2874       return this;
2875     }
2876     /**
2877      *
2878      *
2879      * <pre>
2880      * If present, logo detection has completed successfully.
2881      * </pre>
2882      *
2883      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2884      */
clearLogoAnnotations()2885     public Builder clearLogoAnnotations() {
2886       if (logoAnnotationsBuilder_ == null) {
2887         logoAnnotations_ = java.util.Collections.emptyList();
2888         bitField0_ = (bitField0_ & ~0x00000004);
2889         onChanged();
2890       } else {
2891         logoAnnotationsBuilder_.clear();
2892       }
2893       return this;
2894     }
2895     /**
2896      *
2897      *
2898      * <pre>
2899      * If present, logo detection has completed successfully.
2900      * </pre>
2901      *
2902      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2903      */
removeLogoAnnotations(int index)2904     public Builder removeLogoAnnotations(int index) {
2905       if (logoAnnotationsBuilder_ == null) {
2906         ensureLogoAnnotationsIsMutable();
2907         logoAnnotations_.remove(index);
2908         onChanged();
2909       } else {
2910         logoAnnotationsBuilder_.remove(index);
2911       }
2912       return this;
2913     }
2914     /**
2915      *
2916      *
2917      * <pre>
2918      * If present, logo detection has completed successfully.
2919      * </pre>
2920      *
2921      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2922      */
getLogoAnnotationsBuilder( int index)2923     public com.google.cloud.vision.v1.EntityAnnotation.Builder getLogoAnnotationsBuilder(
2924         int index) {
2925       return getLogoAnnotationsFieldBuilder().getBuilder(index);
2926     }
2927     /**
2928      *
2929      *
2930      * <pre>
2931      * If present, logo detection has completed successfully.
2932      * </pre>
2933      *
2934      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2935      */
getLogoAnnotationsOrBuilder( int index)2936     public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
2937         int index) {
2938       if (logoAnnotationsBuilder_ == null) {
2939         return logoAnnotations_.get(index);
2940       } else {
2941         return logoAnnotationsBuilder_.getMessageOrBuilder(index);
2942       }
2943     }
2944     /**
2945      *
2946      *
2947      * <pre>
2948      * If present, logo detection has completed successfully.
2949      * </pre>
2950      *
2951      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2952      */
2953     public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsOrBuilderList()2954         getLogoAnnotationsOrBuilderList() {
2955       if (logoAnnotationsBuilder_ != null) {
2956         return logoAnnotationsBuilder_.getMessageOrBuilderList();
2957       } else {
2958         return java.util.Collections.unmodifiableList(logoAnnotations_);
2959       }
2960     }
2961     /**
2962      *
2963      *
2964      * <pre>
2965      * If present, logo detection has completed successfully.
2966      * </pre>
2967      *
2968      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2969      */
addLogoAnnotationsBuilder()2970     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder() {
2971       return getLogoAnnotationsFieldBuilder()
2972           .addBuilder(com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
2973     }
2974     /**
2975      *
2976      *
2977      * <pre>
2978      * If present, logo detection has completed successfully.
2979      * </pre>
2980      *
2981      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2982      */
addLogoAnnotationsBuilder( int index)2983     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder(
2984         int index) {
2985       return getLogoAnnotationsFieldBuilder()
2986           .addBuilder(index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
2987     }
2988     /**
2989      *
2990      *
2991      * <pre>
2992      * If present, logo detection has completed successfully.
2993      * </pre>
2994      *
2995      * <code>repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;</code>
2996      */
2997     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation.Builder>
getLogoAnnotationsBuilderList()2998         getLogoAnnotationsBuilderList() {
2999       return getLogoAnnotationsFieldBuilder().getBuilderList();
3000     }
3001 
3002     private com.google.protobuf.RepeatedFieldBuilderV3<
3003             com.google.cloud.vision.v1.EntityAnnotation,
3004             com.google.cloud.vision.v1.EntityAnnotation.Builder,
3005             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsFieldBuilder()3006         getLogoAnnotationsFieldBuilder() {
3007       if (logoAnnotationsBuilder_ == null) {
3008         logoAnnotationsBuilder_ =
3009             new com.google.protobuf.RepeatedFieldBuilderV3<
3010                 com.google.cloud.vision.v1.EntityAnnotation,
3011                 com.google.cloud.vision.v1.EntityAnnotation.Builder,
3012                 com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
3013                 logoAnnotations_,
3014                 ((bitField0_ & 0x00000004) != 0),
3015                 getParentForChildren(),
3016                 isClean());
3017         logoAnnotations_ = null;
3018       }
3019       return logoAnnotationsBuilder_;
3020     }
3021 
3022     private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> labelAnnotations_ =
3023         java.util.Collections.emptyList();
3024 
ensureLabelAnnotationsIsMutable()3025     private void ensureLabelAnnotationsIsMutable() {
3026       if (!((bitField0_ & 0x00000008) != 0)) {
3027         labelAnnotations_ =
3028             new java.util.ArrayList<com.google.cloud.vision.v1.EntityAnnotation>(labelAnnotations_);
3029         bitField0_ |= 0x00000008;
3030       }
3031     }
3032 
3033     private com.google.protobuf.RepeatedFieldBuilderV3<
3034             com.google.cloud.vision.v1.EntityAnnotation,
3035             com.google.cloud.vision.v1.EntityAnnotation.Builder,
3036             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
3037         labelAnnotationsBuilder_;
3038 
3039     /**
3040      *
3041      *
3042      * <pre>
3043      * If present, label detection has completed successfully.
3044      * </pre>
3045      *
3046      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3047      */
getLabelAnnotationsList()3048     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getLabelAnnotationsList() {
3049       if (labelAnnotationsBuilder_ == null) {
3050         return java.util.Collections.unmodifiableList(labelAnnotations_);
3051       } else {
3052         return labelAnnotationsBuilder_.getMessageList();
3053       }
3054     }
3055     /**
3056      *
3057      *
3058      * <pre>
3059      * If present, label detection has completed successfully.
3060      * </pre>
3061      *
3062      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3063      */
getLabelAnnotationsCount()3064     public int getLabelAnnotationsCount() {
3065       if (labelAnnotationsBuilder_ == null) {
3066         return labelAnnotations_.size();
3067       } else {
3068         return labelAnnotationsBuilder_.getCount();
3069       }
3070     }
3071     /**
3072      *
3073      *
3074      * <pre>
3075      * If present, label detection has completed successfully.
3076      * </pre>
3077      *
3078      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3079      */
getLabelAnnotations(int index)3080     public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) {
3081       if (labelAnnotationsBuilder_ == null) {
3082         return labelAnnotations_.get(index);
3083       } else {
3084         return labelAnnotationsBuilder_.getMessage(index);
3085       }
3086     }
3087     /**
3088      *
3089      *
3090      * <pre>
3091      * If present, label detection has completed successfully.
3092      * </pre>
3093      *
3094      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3095      */
setLabelAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)3096     public Builder setLabelAnnotations(
3097         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
3098       if (labelAnnotationsBuilder_ == null) {
3099         if (value == null) {
3100           throw new NullPointerException();
3101         }
3102         ensureLabelAnnotationsIsMutable();
3103         labelAnnotations_.set(index, value);
3104         onChanged();
3105       } else {
3106         labelAnnotationsBuilder_.setMessage(index, value);
3107       }
3108       return this;
3109     }
3110     /**
3111      *
3112      *
3113      * <pre>
3114      * If present, label detection has completed successfully.
3115      * </pre>
3116      *
3117      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3118      */
setLabelAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3119     public Builder setLabelAnnotations(
3120         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3121       if (labelAnnotationsBuilder_ == null) {
3122         ensureLabelAnnotationsIsMutable();
3123         labelAnnotations_.set(index, builderForValue.build());
3124         onChanged();
3125       } else {
3126         labelAnnotationsBuilder_.setMessage(index, builderForValue.build());
3127       }
3128       return this;
3129     }
3130     /**
3131      *
3132      *
3133      * <pre>
3134      * If present, label detection has completed successfully.
3135      * </pre>
3136      *
3137      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3138      */
addLabelAnnotations(com.google.cloud.vision.v1.EntityAnnotation value)3139     public Builder addLabelAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
3140       if (labelAnnotationsBuilder_ == null) {
3141         if (value == null) {
3142           throw new NullPointerException();
3143         }
3144         ensureLabelAnnotationsIsMutable();
3145         labelAnnotations_.add(value);
3146         onChanged();
3147       } else {
3148         labelAnnotationsBuilder_.addMessage(value);
3149       }
3150       return this;
3151     }
3152     /**
3153      *
3154      *
3155      * <pre>
3156      * If present, label detection has completed successfully.
3157      * </pre>
3158      *
3159      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3160      */
addLabelAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)3161     public Builder addLabelAnnotations(
3162         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
3163       if (labelAnnotationsBuilder_ == null) {
3164         if (value == null) {
3165           throw new NullPointerException();
3166         }
3167         ensureLabelAnnotationsIsMutable();
3168         labelAnnotations_.add(index, value);
3169         onChanged();
3170       } else {
3171         labelAnnotationsBuilder_.addMessage(index, value);
3172       }
3173       return this;
3174     }
3175     /**
3176      *
3177      *
3178      * <pre>
3179      * If present, label detection has completed successfully.
3180      * </pre>
3181      *
3182      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3183      */
addLabelAnnotations( com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3184     public Builder addLabelAnnotations(
3185         com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3186       if (labelAnnotationsBuilder_ == null) {
3187         ensureLabelAnnotationsIsMutable();
3188         labelAnnotations_.add(builderForValue.build());
3189         onChanged();
3190       } else {
3191         labelAnnotationsBuilder_.addMessage(builderForValue.build());
3192       }
3193       return this;
3194     }
3195     /**
3196      *
3197      *
3198      * <pre>
3199      * If present, label detection has completed successfully.
3200      * </pre>
3201      *
3202      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3203      */
addLabelAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3204     public Builder addLabelAnnotations(
3205         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3206       if (labelAnnotationsBuilder_ == null) {
3207         ensureLabelAnnotationsIsMutable();
3208         labelAnnotations_.add(index, builderForValue.build());
3209         onChanged();
3210       } else {
3211         labelAnnotationsBuilder_.addMessage(index, builderForValue.build());
3212       }
3213       return this;
3214     }
3215     /**
3216      *
3217      *
3218      * <pre>
3219      * If present, label detection has completed successfully.
3220      * </pre>
3221      *
3222      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3223      */
addAllLabelAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values)3224     public Builder addAllLabelAnnotations(
3225         java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values) {
3226       if (labelAnnotationsBuilder_ == null) {
3227         ensureLabelAnnotationsIsMutable();
3228         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labelAnnotations_);
3229         onChanged();
3230       } else {
3231         labelAnnotationsBuilder_.addAllMessages(values);
3232       }
3233       return this;
3234     }
3235     /**
3236      *
3237      *
3238      * <pre>
3239      * If present, label detection has completed successfully.
3240      * </pre>
3241      *
3242      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3243      */
clearLabelAnnotations()3244     public Builder clearLabelAnnotations() {
3245       if (labelAnnotationsBuilder_ == null) {
3246         labelAnnotations_ = java.util.Collections.emptyList();
3247         bitField0_ = (bitField0_ & ~0x00000008);
3248         onChanged();
3249       } else {
3250         labelAnnotationsBuilder_.clear();
3251       }
3252       return this;
3253     }
3254     /**
3255      *
3256      *
3257      * <pre>
3258      * If present, label detection has completed successfully.
3259      * </pre>
3260      *
3261      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3262      */
removeLabelAnnotations(int index)3263     public Builder removeLabelAnnotations(int index) {
3264       if (labelAnnotationsBuilder_ == null) {
3265         ensureLabelAnnotationsIsMutable();
3266         labelAnnotations_.remove(index);
3267         onChanged();
3268       } else {
3269         labelAnnotationsBuilder_.remove(index);
3270       }
3271       return this;
3272     }
3273     /**
3274      *
3275      *
3276      * <pre>
3277      * If present, label detection has completed successfully.
3278      * </pre>
3279      *
3280      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3281      */
getLabelAnnotationsBuilder( int index)3282     public com.google.cloud.vision.v1.EntityAnnotation.Builder getLabelAnnotationsBuilder(
3283         int index) {
3284       return getLabelAnnotationsFieldBuilder().getBuilder(index);
3285     }
3286     /**
3287      *
3288      *
3289      * <pre>
3290      * If present, label detection has completed successfully.
3291      * </pre>
3292      *
3293      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3294      */
getLabelAnnotationsOrBuilder( int index)3295     public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
3296         int index) {
3297       if (labelAnnotationsBuilder_ == null) {
3298         return labelAnnotations_.get(index);
3299       } else {
3300         return labelAnnotationsBuilder_.getMessageOrBuilder(index);
3301       }
3302     }
3303     /**
3304      *
3305      *
3306      * <pre>
3307      * If present, label detection has completed successfully.
3308      * </pre>
3309      *
3310      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3311      */
3312     public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsOrBuilderList()3313         getLabelAnnotationsOrBuilderList() {
3314       if (labelAnnotationsBuilder_ != null) {
3315         return labelAnnotationsBuilder_.getMessageOrBuilderList();
3316       } else {
3317         return java.util.Collections.unmodifiableList(labelAnnotations_);
3318       }
3319     }
3320     /**
3321      *
3322      *
3323      * <pre>
3324      * If present, label detection has completed successfully.
3325      * </pre>
3326      *
3327      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3328      */
addLabelAnnotationsBuilder()3329     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder() {
3330       return getLabelAnnotationsFieldBuilder()
3331           .addBuilder(com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
3332     }
3333     /**
3334      *
3335      *
3336      * <pre>
3337      * If present, label detection has completed successfully.
3338      * </pre>
3339      *
3340      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3341      */
addLabelAnnotationsBuilder( int index)3342     public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder(
3343         int index) {
3344       return getLabelAnnotationsFieldBuilder()
3345           .addBuilder(index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
3346     }
3347     /**
3348      *
3349      *
3350      * <pre>
3351      * If present, label detection has completed successfully.
3352      * </pre>
3353      *
3354      * <code>repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;</code>
3355      */
3356     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation.Builder>
getLabelAnnotationsBuilderList()3357         getLabelAnnotationsBuilderList() {
3358       return getLabelAnnotationsFieldBuilder().getBuilderList();
3359     }
3360 
3361     private com.google.protobuf.RepeatedFieldBuilderV3<
3362             com.google.cloud.vision.v1.EntityAnnotation,
3363             com.google.cloud.vision.v1.EntityAnnotation.Builder,
3364             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsFieldBuilder()3365         getLabelAnnotationsFieldBuilder() {
3366       if (labelAnnotationsBuilder_ == null) {
3367         labelAnnotationsBuilder_ =
3368             new com.google.protobuf.RepeatedFieldBuilderV3<
3369                 com.google.cloud.vision.v1.EntityAnnotation,
3370                 com.google.cloud.vision.v1.EntityAnnotation.Builder,
3371                 com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
3372                 labelAnnotations_,
3373                 ((bitField0_ & 0x00000008) != 0),
3374                 getParentForChildren(),
3375                 isClean());
3376         labelAnnotations_ = null;
3377       }
3378       return labelAnnotationsBuilder_;
3379     }
3380 
3381     private java.util.List<com.google.cloud.vision.v1.LocalizedObjectAnnotation>
3382         localizedObjectAnnotations_ = java.util.Collections.emptyList();
3383 
ensureLocalizedObjectAnnotationsIsMutable()3384     private void ensureLocalizedObjectAnnotationsIsMutable() {
3385       if (!((bitField0_ & 0x00000010) != 0)) {
3386         localizedObjectAnnotations_ =
3387             new java.util.ArrayList<com.google.cloud.vision.v1.LocalizedObjectAnnotation>(
3388                 localizedObjectAnnotations_);
3389         bitField0_ |= 0x00000010;
3390       }
3391     }
3392 
3393     private com.google.protobuf.RepeatedFieldBuilderV3<
3394             com.google.cloud.vision.v1.LocalizedObjectAnnotation,
3395             com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder,
3396             com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>
3397         localizedObjectAnnotationsBuilder_;
3398 
3399     /**
3400      *
3401      *
3402      * <pre>
3403      * If present, localized object detection has completed successfully.
3404      * This will be sorted descending by confidence score.
3405      * </pre>
3406      *
3407      * <code>
3408      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3409      * </code>
3410      */
3411     public java.util.List<com.google.cloud.vision.v1.LocalizedObjectAnnotation>
getLocalizedObjectAnnotationsList()3412         getLocalizedObjectAnnotationsList() {
3413       if (localizedObjectAnnotationsBuilder_ == null) {
3414         return java.util.Collections.unmodifiableList(localizedObjectAnnotations_);
3415       } else {
3416         return localizedObjectAnnotationsBuilder_.getMessageList();
3417       }
3418     }
3419     /**
3420      *
3421      *
3422      * <pre>
3423      * If present, localized object detection has completed successfully.
3424      * This will be sorted descending by confidence score.
3425      * </pre>
3426      *
3427      * <code>
3428      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3429      * </code>
3430      */
getLocalizedObjectAnnotationsCount()3431     public int getLocalizedObjectAnnotationsCount() {
3432       if (localizedObjectAnnotationsBuilder_ == null) {
3433         return localizedObjectAnnotations_.size();
3434       } else {
3435         return localizedObjectAnnotationsBuilder_.getCount();
3436       }
3437     }
3438     /**
3439      *
3440      *
3441      * <pre>
3442      * If present, localized object detection has completed successfully.
3443      * This will be sorted descending by confidence score.
3444      * </pre>
3445      *
3446      * <code>
3447      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3448      * </code>
3449      */
getLocalizedObjectAnnotations( int index)3450     public com.google.cloud.vision.v1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(
3451         int index) {
3452       if (localizedObjectAnnotationsBuilder_ == null) {
3453         return localizedObjectAnnotations_.get(index);
3454       } else {
3455         return localizedObjectAnnotationsBuilder_.getMessage(index);
3456       }
3457     }
3458     /**
3459      *
3460      *
3461      * <pre>
3462      * If present, localized object detection has completed successfully.
3463      * This will be sorted descending by confidence score.
3464      * </pre>
3465      *
3466      * <code>
3467      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3468      * </code>
3469      */
setLocalizedObjectAnnotations( int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value)3470     public Builder setLocalizedObjectAnnotations(
3471         int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) {
3472       if (localizedObjectAnnotationsBuilder_ == null) {
3473         if (value == null) {
3474           throw new NullPointerException();
3475         }
3476         ensureLocalizedObjectAnnotationsIsMutable();
3477         localizedObjectAnnotations_.set(index, value);
3478         onChanged();
3479       } else {
3480         localizedObjectAnnotationsBuilder_.setMessage(index, value);
3481       }
3482       return this;
3483     }
3484     /**
3485      *
3486      *
3487      * <pre>
3488      * If present, localized object detection has completed successfully.
3489      * This will be sorted descending by confidence score.
3490      * </pre>
3491      *
3492      * <code>
3493      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3494      * </code>
3495      */
setLocalizedObjectAnnotations( int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue)3496     public Builder setLocalizedObjectAnnotations(
3497         int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) {
3498       if (localizedObjectAnnotationsBuilder_ == null) {
3499         ensureLocalizedObjectAnnotationsIsMutable();
3500         localizedObjectAnnotations_.set(index, builderForValue.build());
3501         onChanged();
3502       } else {
3503         localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build());
3504       }
3505       return this;
3506     }
3507     /**
3508      *
3509      *
3510      * <pre>
3511      * If present, localized object detection has completed successfully.
3512      * This will be sorted descending by confidence score.
3513      * </pre>
3514      *
3515      * <code>
3516      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3517      * </code>
3518      */
addLocalizedObjectAnnotations( com.google.cloud.vision.v1.LocalizedObjectAnnotation value)3519     public Builder addLocalizedObjectAnnotations(
3520         com.google.cloud.vision.v1.LocalizedObjectAnnotation value) {
3521       if (localizedObjectAnnotationsBuilder_ == null) {
3522         if (value == null) {
3523           throw new NullPointerException();
3524         }
3525         ensureLocalizedObjectAnnotationsIsMutable();
3526         localizedObjectAnnotations_.add(value);
3527         onChanged();
3528       } else {
3529         localizedObjectAnnotationsBuilder_.addMessage(value);
3530       }
3531       return this;
3532     }
3533     /**
3534      *
3535      *
3536      * <pre>
3537      * If present, localized object detection has completed successfully.
3538      * This will be sorted descending by confidence score.
3539      * </pre>
3540      *
3541      * <code>
3542      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3543      * </code>
3544      */
addLocalizedObjectAnnotations( int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value)3545     public Builder addLocalizedObjectAnnotations(
3546         int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation value) {
3547       if (localizedObjectAnnotationsBuilder_ == null) {
3548         if (value == null) {
3549           throw new NullPointerException();
3550         }
3551         ensureLocalizedObjectAnnotationsIsMutable();
3552         localizedObjectAnnotations_.add(index, value);
3553         onChanged();
3554       } else {
3555         localizedObjectAnnotationsBuilder_.addMessage(index, value);
3556       }
3557       return this;
3558     }
3559     /**
3560      *
3561      *
3562      * <pre>
3563      * If present, localized object detection has completed successfully.
3564      * This will be sorted descending by confidence score.
3565      * </pre>
3566      *
3567      * <code>
3568      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3569      * </code>
3570      */
addLocalizedObjectAnnotations( com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue)3571     public Builder addLocalizedObjectAnnotations(
3572         com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) {
3573       if (localizedObjectAnnotationsBuilder_ == null) {
3574         ensureLocalizedObjectAnnotationsIsMutable();
3575         localizedObjectAnnotations_.add(builderForValue.build());
3576         onChanged();
3577       } else {
3578         localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build());
3579       }
3580       return this;
3581     }
3582     /**
3583      *
3584      *
3585      * <pre>
3586      * If present, localized object detection has completed successfully.
3587      * This will be sorted descending by confidence score.
3588      * </pre>
3589      *
3590      * <code>
3591      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3592      * </code>
3593      */
addLocalizedObjectAnnotations( int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue)3594     public Builder addLocalizedObjectAnnotations(
3595         int index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder builderForValue) {
3596       if (localizedObjectAnnotationsBuilder_ == null) {
3597         ensureLocalizedObjectAnnotationsIsMutable();
3598         localizedObjectAnnotations_.add(index, builderForValue.build());
3599         onChanged();
3600       } else {
3601         localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build());
3602       }
3603       return this;
3604     }
3605     /**
3606      *
3607      *
3608      * <pre>
3609      * If present, localized object detection has completed successfully.
3610      * This will be sorted descending by confidence score.
3611      * </pre>
3612      *
3613      * <code>
3614      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3615      * </code>
3616      */
addAllLocalizedObjectAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.LocalizedObjectAnnotation> values)3617     public Builder addAllLocalizedObjectAnnotations(
3618         java.lang.Iterable<? extends com.google.cloud.vision.v1.LocalizedObjectAnnotation> values) {
3619       if (localizedObjectAnnotationsBuilder_ == null) {
3620         ensureLocalizedObjectAnnotationsIsMutable();
3621         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, localizedObjectAnnotations_);
3622         onChanged();
3623       } else {
3624         localizedObjectAnnotationsBuilder_.addAllMessages(values);
3625       }
3626       return this;
3627     }
3628     /**
3629      *
3630      *
3631      * <pre>
3632      * If present, localized object detection has completed successfully.
3633      * This will be sorted descending by confidence score.
3634      * </pre>
3635      *
3636      * <code>
3637      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3638      * </code>
3639      */
clearLocalizedObjectAnnotations()3640     public Builder clearLocalizedObjectAnnotations() {
3641       if (localizedObjectAnnotationsBuilder_ == null) {
3642         localizedObjectAnnotations_ = java.util.Collections.emptyList();
3643         bitField0_ = (bitField0_ & ~0x00000010);
3644         onChanged();
3645       } else {
3646         localizedObjectAnnotationsBuilder_.clear();
3647       }
3648       return this;
3649     }
3650     /**
3651      *
3652      *
3653      * <pre>
3654      * If present, localized object detection has completed successfully.
3655      * This will be sorted descending by confidence score.
3656      * </pre>
3657      *
3658      * <code>
3659      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3660      * </code>
3661      */
removeLocalizedObjectAnnotations(int index)3662     public Builder removeLocalizedObjectAnnotations(int index) {
3663       if (localizedObjectAnnotationsBuilder_ == null) {
3664         ensureLocalizedObjectAnnotationsIsMutable();
3665         localizedObjectAnnotations_.remove(index);
3666         onChanged();
3667       } else {
3668         localizedObjectAnnotationsBuilder_.remove(index);
3669       }
3670       return this;
3671     }
3672     /**
3673      *
3674      *
3675      * <pre>
3676      * If present, localized object detection has completed successfully.
3677      * This will be sorted descending by confidence score.
3678      * </pre>
3679      *
3680      * <code>
3681      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3682      * </code>
3683      */
3684     public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder
getLocalizedObjectAnnotationsBuilder(int index)3685         getLocalizedObjectAnnotationsBuilder(int index) {
3686       return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index);
3687     }
3688     /**
3689      *
3690      *
3691      * <pre>
3692      * If present, localized object detection has completed successfully.
3693      * This will be sorted descending by confidence score.
3694      * </pre>
3695      *
3696      * <code>
3697      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3698      * </code>
3699      */
3700     public com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder
getLocalizedObjectAnnotationsOrBuilder(int index)3701         getLocalizedObjectAnnotationsOrBuilder(int index) {
3702       if (localizedObjectAnnotationsBuilder_ == null) {
3703         return localizedObjectAnnotations_.get(index);
3704       } else {
3705         return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index);
3706       }
3707     }
3708     /**
3709      *
3710      *
3711      * <pre>
3712      * If present, localized object detection has completed successfully.
3713      * This will be sorted descending by confidence score.
3714      * </pre>
3715      *
3716      * <code>
3717      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3718      * </code>
3719      */
3720     public java.util.List<? extends com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>
getLocalizedObjectAnnotationsOrBuilderList()3721         getLocalizedObjectAnnotationsOrBuilderList() {
3722       if (localizedObjectAnnotationsBuilder_ != null) {
3723         return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList();
3724       } else {
3725         return java.util.Collections.unmodifiableList(localizedObjectAnnotations_);
3726       }
3727     }
3728     /**
3729      *
3730      *
3731      * <pre>
3732      * If present, localized object detection has completed successfully.
3733      * This will be sorted descending by confidence score.
3734      * </pre>
3735      *
3736      * <code>
3737      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3738      * </code>
3739      */
3740     public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder
addLocalizedObjectAnnotationsBuilder()3741         addLocalizedObjectAnnotationsBuilder() {
3742       return getLocalizedObjectAnnotationsFieldBuilder()
3743           .addBuilder(com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance());
3744     }
3745     /**
3746      *
3747      *
3748      * <pre>
3749      * If present, localized object detection has completed successfully.
3750      * This will be sorted descending by confidence score.
3751      * </pre>
3752      *
3753      * <code>
3754      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3755      * </code>
3756      */
3757     public com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder
addLocalizedObjectAnnotationsBuilder(int index)3758         addLocalizedObjectAnnotationsBuilder(int index) {
3759       return getLocalizedObjectAnnotationsFieldBuilder()
3760           .addBuilder(
3761               index, com.google.cloud.vision.v1.LocalizedObjectAnnotation.getDefaultInstance());
3762     }
3763     /**
3764      *
3765      *
3766      * <pre>
3767      * If present, localized object detection has completed successfully.
3768      * This will be sorted descending by confidence score.
3769      * </pre>
3770      *
3771      * <code>
3772      * repeated .google.cloud.vision.v1.LocalizedObjectAnnotation localized_object_annotations = 22;
3773      * </code>
3774      */
3775     public java.util.List<com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder>
getLocalizedObjectAnnotationsBuilderList()3776         getLocalizedObjectAnnotationsBuilderList() {
3777       return getLocalizedObjectAnnotationsFieldBuilder().getBuilderList();
3778     }
3779 
3780     private com.google.protobuf.RepeatedFieldBuilderV3<
3781             com.google.cloud.vision.v1.LocalizedObjectAnnotation,
3782             com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder,
3783             com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>
getLocalizedObjectAnnotationsFieldBuilder()3784         getLocalizedObjectAnnotationsFieldBuilder() {
3785       if (localizedObjectAnnotationsBuilder_ == null) {
3786         localizedObjectAnnotationsBuilder_ =
3787             new com.google.protobuf.RepeatedFieldBuilderV3<
3788                 com.google.cloud.vision.v1.LocalizedObjectAnnotation,
3789                 com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder,
3790                 com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>(
3791                 localizedObjectAnnotations_,
3792                 ((bitField0_ & 0x00000010) != 0),
3793                 getParentForChildren(),
3794                 isClean());
3795         localizedObjectAnnotations_ = null;
3796       }
3797       return localizedObjectAnnotationsBuilder_;
3798     }
3799 
3800     private java.util.List<com.google.cloud.vision.v1.EntityAnnotation> textAnnotations_ =
3801         java.util.Collections.emptyList();
3802 
ensureTextAnnotationsIsMutable()3803     private void ensureTextAnnotationsIsMutable() {
3804       if (!((bitField0_ & 0x00000020) != 0)) {
3805         textAnnotations_ =
3806             new java.util.ArrayList<com.google.cloud.vision.v1.EntityAnnotation>(textAnnotations_);
3807         bitField0_ |= 0x00000020;
3808       }
3809     }
3810 
3811     private com.google.protobuf.RepeatedFieldBuilderV3<
3812             com.google.cloud.vision.v1.EntityAnnotation,
3813             com.google.cloud.vision.v1.EntityAnnotation.Builder,
3814             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
3815         textAnnotationsBuilder_;
3816 
3817     /**
3818      *
3819      *
3820      * <pre>
3821      * If present, text (OCR) detection has completed successfully.
3822      * </pre>
3823      *
3824      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3825      */
getTextAnnotationsList()3826     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation> getTextAnnotationsList() {
3827       if (textAnnotationsBuilder_ == null) {
3828         return java.util.Collections.unmodifiableList(textAnnotations_);
3829       } else {
3830         return textAnnotationsBuilder_.getMessageList();
3831       }
3832     }
3833     /**
3834      *
3835      *
3836      * <pre>
3837      * If present, text (OCR) detection has completed successfully.
3838      * </pre>
3839      *
3840      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3841      */
getTextAnnotationsCount()3842     public int getTextAnnotationsCount() {
3843       if (textAnnotationsBuilder_ == null) {
3844         return textAnnotations_.size();
3845       } else {
3846         return textAnnotationsBuilder_.getCount();
3847       }
3848     }
3849     /**
3850      *
3851      *
3852      * <pre>
3853      * If present, text (OCR) detection has completed successfully.
3854      * </pre>
3855      *
3856      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3857      */
getTextAnnotations(int index)3858     public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) {
3859       if (textAnnotationsBuilder_ == null) {
3860         return textAnnotations_.get(index);
3861       } else {
3862         return textAnnotationsBuilder_.getMessage(index);
3863       }
3864     }
3865     /**
3866      *
3867      *
3868      * <pre>
3869      * If present, text (OCR) detection has completed successfully.
3870      * </pre>
3871      *
3872      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3873      */
setTextAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)3874     public Builder setTextAnnotations(
3875         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
3876       if (textAnnotationsBuilder_ == null) {
3877         if (value == null) {
3878           throw new NullPointerException();
3879         }
3880         ensureTextAnnotationsIsMutable();
3881         textAnnotations_.set(index, value);
3882         onChanged();
3883       } else {
3884         textAnnotationsBuilder_.setMessage(index, value);
3885       }
3886       return this;
3887     }
3888     /**
3889      *
3890      *
3891      * <pre>
3892      * If present, text (OCR) detection has completed successfully.
3893      * </pre>
3894      *
3895      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3896      */
setTextAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3897     public Builder setTextAnnotations(
3898         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3899       if (textAnnotationsBuilder_ == null) {
3900         ensureTextAnnotationsIsMutable();
3901         textAnnotations_.set(index, builderForValue.build());
3902         onChanged();
3903       } else {
3904         textAnnotationsBuilder_.setMessage(index, builderForValue.build());
3905       }
3906       return this;
3907     }
3908     /**
3909      *
3910      *
3911      * <pre>
3912      * If present, text (OCR) detection has completed successfully.
3913      * </pre>
3914      *
3915      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3916      */
addTextAnnotations(com.google.cloud.vision.v1.EntityAnnotation value)3917     public Builder addTextAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
3918       if (textAnnotationsBuilder_ == null) {
3919         if (value == null) {
3920           throw new NullPointerException();
3921         }
3922         ensureTextAnnotationsIsMutable();
3923         textAnnotations_.add(value);
3924         onChanged();
3925       } else {
3926         textAnnotationsBuilder_.addMessage(value);
3927       }
3928       return this;
3929     }
3930     /**
3931      *
3932      *
3933      * <pre>
3934      * If present, text (OCR) detection has completed successfully.
3935      * </pre>
3936      *
3937      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3938      */
addTextAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation value)3939     public Builder addTextAnnotations(
3940         int index, com.google.cloud.vision.v1.EntityAnnotation value) {
3941       if (textAnnotationsBuilder_ == null) {
3942         if (value == null) {
3943           throw new NullPointerException();
3944         }
3945         ensureTextAnnotationsIsMutable();
3946         textAnnotations_.add(index, value);
3947         onChanged();
3948       } else {
3949         textAnnotationsBuilder_.addMessage(index, value);
3950       }
3951       return this;
3952     }
3953     /**
3954      *
3955      *
3956      * <pre>
3957      * If present, text (OCR) detection has completed successfully.
3958      * </pre>
3959      *
3960      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3961      */
addTextAnnotations( com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3962     public Builder addTextAnnotations(
3963         com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3964       if (textAnnotationsBuilder_ == null) {
3965         ensureTextAnnotationsIsMutable();
3966         textAnnotations_.add(builderForValue.build());
3967         onChanged();
3968       } else {
3969         textAnnotationsBuilder_.addMessage(builderForValue.build());
3970       }
3971       return this;
3972     }
3973     /**
3974      *
3975      *
3976      * <pre>
3977      * If present, text (OCR) detection has completed successfully.
3978      * </pre>
3979      *
3980      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
3981      */
addTextAnnotations( int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue)3982     public Builder addTextAnnotations(
3983         int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
3984       if (textAnnotationsBuilder_ == null) {
3985         ensureTextAnnotationsIsMutable();
3986         textAnnotations_.add(index, builderForValue.build());
3987         onChanged();
3988       } else {
3989         textAnnotationsBuilder_.addMessage(index, builderForValue.build());
3990       }
3991       return this;
3992     }
3993     /**
3994      *
3995      *
3996      * <pre>
3997      * If present, text (OCR) detection has completed successfully.
3998      * </pre>
3999      *
4000      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4001      */
addAllTextAnnotations( java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values)4002     public Builder addAllTextAnnotations(
4003         java.lang.Iterable<? extends com.google.cloud.vision.v1.EntityAnnotation> values) {
4004       if (textAnnotationsBuilder_ == null) {
4005         ensureTextAnnotationsIsMutable();
4006         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textAnnotations_);
4007         onChanged();
4008       } else {
4009         textAnnotationsBuilder_.addAllMessages(values);
4010       }
4011       return this;
4012     }
4013     /**
4014      *
4015      *
4016      * <pre>
4017      * If present, text (OCR) detection has completed successfully.
4018      * </pre>
4019      *
4020      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4021      */
clearTextAnnotations()4022     public Builder clearTextAnnotations() {
4023       if (textAnnotationsBuilder_ == null) {
4024         textAnnotations_ = java.util.Collections.emptyList();
4025         bitField0_ = (bitField0_ & ~0x00000020);
4026         onChanged();
4027       } else {
4028         textAnnotationsBuilder_.clear();
4029       }
4030       return this;
4031     }
4032     /**
4033      *
4034      *
4035      * <pre>
4036      * If present, text (OCR) detection has completed successfully.
4037      * </pre>
4038      *
4039      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4040      */
removeTextAnnotations(int index)4041     public Builder removeTextAnnotations(int index) {
4042       if (textAnnotationsBuilder_ == null) {
4043         ensureTextAnnotationsIsMutable();
4044         textAnnotations_.remove(index);
4045         onChanged();
4046       } else {
4047         textAnnotationsBuilder_.remove(index);
4048       }
4049       return this;
4050     }
4051     /**
4052      *
4053      *
4054      * <pre>
4055      * If present, text (OCR) detection has completed successfully.
4056      * </pre>
4057      *
4058      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4059      */
getTextAnnotationsBuilder( int index)4060     public com.google.cloud.vision.v1.EntityAnnotation.Builder getTextAnnotationsBuilder(
4061         int index) {
4062       return getTextAnnotationsFieldBuilder().getBuilder(index);
4063     }
4064     /**
4065      *
4066      *
4067      * <pre>
4068      * If present, text (OCR) detection has completed successfully.
4069      * </pre>
4070      *
4071      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4072      */
getTextAnnotationsOrBuilder( int index)4073     public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
4074         int index) {
4075       if (textAnnotationsBuilder_ == null) {
4076         return textAnnotations_.get(index);
4077       } else {
4078         return textAnnotationsBuilder_.getMessageOrBuilder(index);
4079       }
4080     }
4081     /**
4082      *
4083      *
4084      * <pre>
4085      * If present, text (OCR) detection has completed successfully.
4086      * </pre>
4087      *
4088      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4089      */
4090     public java.util.List<? extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsOrBuilderList()4091         getTextAnnotationsOrBuilderList() {
4092       if (textAnnotationsBuilder_ != null) {
4093         return textAnnotationsBuilder_.getMessageOrBuilderList();
4094       } else {
4095         return java.util.Collections.unmodifiableList(textAnnotations_);
4096       }
4097     }
4098     /**
4099      *
4100      *
4101      * <pre>
4102      * If present, text (OCR) detection has completed successfully.
4103      * </pre>
4104      *
4105      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4106      */
addTextAnnotationsBuilder()4107     public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder() {
4108       return getTextAnnotationsFieldBuilder()
4109           .addBuilder(com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
4110     }
4111     /**
4112      *
4113      *
4114      * <pre>
4115      * If present, text (OCR) detection has completed successfully.
4116      * </pre>
4117      *
4118      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4119      */
addTextAnnotationsBuilder( int index)4120     public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder(
4121         int index) {
4122       return getTextAnnotationsFieldBuilder()
4123           .addBuilder(index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
4124     }
4125     /**
4126      *
4127      *
4128      * <pre>
4129      * If present, text (OCR) detection has completed successfully.
4130      * </pre>
4131      *
4132      * <code>repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;</code>
4133      */
4134     public java.util.List<com.google.cloud.vision.v1.EntityAnnotation.Builder>
getTextAnnotationsBuilderList()4135         getTextAnnotationsBuilderList() {
4136       return getTextAnnotationsFieldBuilder().getBuilderList();
4137     }
4138 
4139     private com.google.protobuf.RepeatedFieldBuilderV3<
4140             com.google.cloud.vision.v1.EntityAnnotation,
4141             com.google.cloud.vision.v1.EntityAnnotation.Builder,
4142             com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsFieldBuilder()4143         getTextAnnotationsFieldBuilder() {
4144       if (textAnnotationsBuilder_ == null) {
4145         textAnnotationsBuilder_ =
4146             new com.google.protobuf.RepeatedFieldBuilderV3<
4147                 com.google.cloud.vision.v1.EntityAnnotation,
4148                 com.google.cloud.vision.v1.EntityAnnotation.Builder,
4149                 com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
4150                 textAnnotations_,
4151                 ((bitField0_ & 0x00000020) != 0),
4152                 getParentForChildren(),
4153                 isClean());
4154         textAnnotations_ = null;
4155       }
4156       return textAnnotationsBuilder_;
4157     }
4158 
4159     private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_;
4160     private com.google.protobuf.SingleFieldBuilderV3<
4161             com.google.cloud.vision.v1.TextAnnotation,
4162             com.google.cloud.vision.v1.TextAnnotation.Builder,
4163             com.google.cloud.vision.v1.TextAnnotationOrBuilder>
4164         fullTextAnnotationBuilder_;
4165     /**
4166      *
4167      *
4168      * <pre>
4169      * If present, text (OCR) detection or document (OCR) text detection has
4170      * completed successfully.
4171      * This annotation provides the structural hierarchy for the OCR detected
4172      * text.
4173      * </pre>
4174      *
4175      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4176      *
4177      * @return Whether the fullTextAnnotation field is set.
4178      */
hasFullTextAnnotation()4179     public boolean hasFullTextAnnotation() {
4180       return ((bitField0_ & 0x00000040) != 0);
4181     }
4182     /**
4183      *
4184      *
4185      * <pre>
4186      * If present, text (OCR) detection or document (OCR) text detection has
4187      * completed successfully.
4188      * This annotation provides the structural hierarchy for the OCR detected
4189      * text.
4190      * </pre>
4191      *
4192      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4193      *
4194      * @return The fullTextAnnotation.
4195      */
getFullTextAnnotation()4196     public com.google.cloud.vision.v1.TextAnnotation getFullTextAnnotation() {
4197       if (fullTextAnnotationBuilder_ == null) {
4198         return fullTextAnnotation_ == null
4199             ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()
4200             : fullTextAnnotation_;
4201       } else {
4202         return fullTextAnnotationBuilder_.getMessage();
4203       }
4204     }
4205     /**
4206      *
4207      *
4208      * <pre>
4209      * If present, text (OCR) detection or document (OCR) text detection has
4210      * completed successfully.
4211      * This annotation provides the structural hierarchy for the OCR detected
4212      * text.
4213      * </pre>
4214      *
4215      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4216      */
setFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value)4217     public Builder setFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) {
4218       if (fullTextAnnotationBuilder_ == null) {
4219         if (value == null) {
4220           throw new NullPointerException();
4221         }
4222         fullTextAnnotation_ = value;
4223       } else {
4224         fullTextAnnotationBuilder_.setMessage(value);
4225       }
4226       bitField0_ |= 0x00000040;
4227       onChanged();
4228       return this;
4229     }
4230     /**
4231      *
4232      *
4233      * <pre>
4234      * If present, text (OCR) detection or document (OCR) text detection has
4235      * completed successfully.
4236      * This annotation provides the structural hierarchy for the OCR detected
4237      * text.
4238      * </pre>
4239      *
4240      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4241      */
setFullTextAnnotation( com.google.cloud.vision.v1.TextAnnotation.Builder builderForValue)4242     public Builder setFullTextAnnotation(
4243         com.google.cloud.vision.v1.TextAnnotation.Builder builderForValue) {
4244       if (fullTextAnnotationBuilder_ == null) {
4245         fullTextAnnotation_ = builderForValue.build();
4246       } else {
4247         fullTextAnnotationBuilder_.setMessage(builderForValue.build());
4248       }
4249       bitField0_ |= 0x00000040;
4250       onChanged();
4251       return this;
4252     }
4253     /**
4254      *
4255      *
4256      * <pre>
4257      * If present, text (OCR) detection or document (OCR) text detection has
4258      * completed successfully.
4259      * This annotation provides the structural hierarchy for the OCR detected
4260      * text.
4261      * </pre>
4262      *
4263      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4264      */
mergeFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value)4265     public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1.TextAnnotation value) {
4266       if (fullTextAnnotationBuilder_ == null) {
4267         if (((bitField0_ & 0x00000040) != 0)
4268             && fullTextAnnotation_ != null
4269             && fullTextAnnotation_
4270                 != com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()) {
4271           getFullTextAnnotationBuilder().mergeFrom(value);
4272         } else {
4273           fullTextAnnotation_ = value;
4274         }
4275       } else {
4276         fullTextAnnotationBuilder_.mergeFrom(value);
4277       }
4278       bitField0_ |= 0x00000040;
4279       onChanged();
4280       return this;
4281     }
4282     /**
4283      *
4284      *
4285      * <pre>
4286      * If present, text (OCR) detection or document (OCR) text detection has
4287      * completed successfully.
4288      * This annotation provides the structural hierarchy for the OCR detected
4289      * text.
4290      * </pre>
4291      *
4292      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4293      */
clearFullTextAnnotation()4294     public Builder clearFullTextAnnotation() {
4295       bitField0_ = (bitField0_ & ~0x00000040);
4296       fullTextAnnotation_ = null;
4297       if (fullTextAnnotationBuilder_ != null) {
4298         fullTextAnnotationBuilder_.dispose();
4299         fullTextAnnotationBuilder_ = null;
4300       }
4301       onChanged();
4302       return this;
4303     }
4304     /**
4305      *
4306      *
4307      * <pre>
4308      * If present, text (OCR) detection or document (OCR) text detection has
4309      * completed successfully.
4310      * This annotation provides the structural hierarchy for the OCR detected
4311      * text.
4312      * </pre>
4313      *
4314      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4315      */
getFullTextAnnotationBuilder()4316     public com.google.cloud.vision.v1.TextAnnotation.Builder getFullTextAnnotationBuilder() {
4317       bitField0_ |= 0x00000040;
4318       onChanged();
4319       return getFullTextAnnotationFieldBuilder().getBuilder();
4320     }
4321     /**
4322      *
4323      *
4324      * <pre>
4325      * If present, text (OCR) detection or document (OCR) text detection has
4326      * completed successfully.
4327      * This annotation provides the structural hierarchy for the OCR detected
4328      * text.
4329      * </pre>
4330      *
4331      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4332      */
getFullTextAnnotationOrBuilder()4333     public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() {
4334       if (fullTextAnnotationBuilder_ != null) {
4335         return fullTextAnnotationBuilder_.getMessageOrBuilder();
4336       } else {
4337         return fullTextAnnotation_ == null
4338             ? com.google.cloud.vision.v1.TextAnnotation.getDefaultInstance()
4339             : fullTextAnnotation_;
4340       }
4341     }
4342     /**
4343      *
4344      *
4345      * <pre>
4346      * If present, text (OCR) detection or document (OCR) text detection has
4347      * completed successfully.
4348      * This annotation provides the structural hierarchy for the OCR detected
4349      * text.
4350      * </pre>
4351      *
4352      * <code>.google.cloud.vision.v1.TextAnnotation full_text_annotation = 12;</code>
4353      */
4354     private com.google.protobuf.SingleFieldBuilderV3<
4355             com.google.cloud.vision.v1.TextAnnotation,
4356             com.google.cloud.vision.v1.TextAnnotation.Builder,
4357             com.google.cloud.vision.v1.TextAnnotationOrBuilder>
getFullTextAnnotationFieldBuilder()4358         getFullTextAnnotationFieldBuilder() {
4359       if (fullTextAnnotationBuilder_ == null) {
4360         fullTextAnnotationBuilder_ =
4361             new com.google.protobuf.SingleFieldBuilderV3<
4362                 com.google.cloud.vision.v1.TextAnnotation,
4363                 com.google.cloud.vision.v1.TextAnnotation.Builder,
4364                 com.google.cloud.vision.v1.TextAnnotationOrBuilder>(
4365                 getFullTextAnnotation(), getParentForChildren(), isClean());
4366         fullTextAnnotation_ = null;
4367       }
4368       return fullTextAnnotationBuilder_;
4369     }
4370 
4371     private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_;
4372     private com.google.protobuf.SingleFieldBuilderV3<
4373             com.google.cloud.vision.v1.SafeSearchAnnotation,
4374             com.google.cloud.vision.v1.SafeSearchAnnotation.Builder,
4375             com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>
4376         safeSearchAnnotationBuilder_;
4377     /**
4378      *
4379      *
4380      * <pre>
4381      * If present, safe-search annotation has completed successfully.
4382      * </pre>
4383      *
4384      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4385      *
4386      * @return Whether the safeSearchAnnotation field is set.
4387      */
hasSafeSearchAnnotation()4388     public boolean hasSafeSearchAnnotation() {
4389       return ((bitField0_ & 0x00000080) != 0);
4390     }
4391     /**
4392      *
4393      *
4394      * <pre>
4395      * If present, safe-search annotation has completed successfully.
4396      * </pre>
4397      *
4398      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4399      *
4400      * @return The safeSearchAnnotation.
4401      */
getSafeSearchAnnotation()4402     public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() {
4403       if (safeSearchAnnotationBuilder_ == null) {
4404         return safeSearchAnnotation_ == null
4405             ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()
4406             : safeSearchAnnotation_;
4407       } else {
4408         return safeSearchAnnotationBuilder_.getMessage();
4409       }
4410     }
4411     /**
4412      *
4413      *
4414      * <pre>
4415      * If present, safe-search annotation has completed successfully.
4416      * </pre>
4417      *
4418      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4419      */
setSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value)4420     public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) {
4421       if (safeSearchAnnotationBuilder_ == null) {
4422         if (value == null) {
4423           throw new NullPointerException();
4424         }
4425         safeSearchAnnotation_ = value;
4426       } else {
4427         safeSearchAnnotationBuilder_.setMessage(value);
4428       }
4429       bitField0_ |= 0x00000080;
4430       onChanged();
4431       return this;
4432     }
4433     /**
4434      *
4435      *
4436      * <pre>
4437      * If present, safe-search annotation has completed successfully.
4438      * </pre>
4439      *
4440      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4441      */
setSafeSearchAnnotation( com.google.cloud.vision.v1.SafeSearchAnnotation.Builder builderForValue)4442     public Builder setSafeSearchAnnotation(
4443         com.google.cloud.vision.v1.SafeSearchAnnotation.Builder builderForValue) {
4444       if (safeSearchAnnotationBuilder_ == null) {
4445         safeSearchAnnotation_ = builderForValue.build();
4446       } else {
4447         safeSearchAnnotationBuilder_.setMessage(builderForValue.build());
4448       }
4449       bitField0_ |= 0x00000080;
4450       onChanged();
4451       return this;
4452     }
4453     /**
4454      *
4455      *
4456      * <pre>
4457      * If present, safe-search annotation has completed successfully.
4458      * </pre>
4459      *
4460      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4461      */
mergeSafeSearchAnnotation( com.google.cloud.vision.v1.SafeSearchAnnotation value)4462     public Builder mergeSafeSearchAnnotation(
4463         com.google.cloud.vision.v1.SafeSearchAnnotation value) {
4464       if (safeSearchAnnotationBuilder_ == null) {
4465         if (((bitField0_ & 0x00000080) != 0)
4466             && safeSearchAnnotation_ != null
4467             && safeSearchAnnotation_
4468                 != com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()) {
4469           getSafeSearchAnnotationBuilder().mergeFrom(value);
4470         } else {
4471           safeSearchAnnotation_ = value;
4472         }
4473       } else {
4474         safeSearchAnnotationBuilder_.mergeFrom(value);
4475       }
4476       bitField0_ |= 0x00000080;
4477       onChanged();
4478       return this;
4479     }
4480     /**
4481      *
4482      *
4483      * <pre>
4484      * If present, safe-search annotation has completed successfully.
4485      * </pre>
4486      *
4487      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4488      */
clearSafeSearchAnnotation()4489     public Builder clearSafeSearchAnnotation() {
4490       bitField0_ = (bitField0_ & ~0x00000080);
4491       safeSearchAnnotation_ = null;
4492       if (safeSearchAnnotationBuilder_ != null) {
4493         safeSearchAnnotationBuilder_.dispose();
4494         safeSearchAnnotationBuilder_ = null;
4495       }
4496       onChanged();
4497       return this;
4498     }
4499     /**
4500      *
4501      *
4502      * <pre>
4503      * If present, safe-search annotation has completed successfully.
4504      * </pre>
4505      *
4506      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4507      */
4508     public com.google.cloud.vision.v1.SafeSearchAnnotation.Builder
getSafeSearchAnnotationBuilder()4509         getSafeSearchAnnotationBuilder() {
4510       bitField0_ |= 0x00000080;
4511       onChanged();
4512       return getSafeSearchAnnotationFieldBuilder().getBuilder();
4513     }
4514     /**
4515      *
4516      *
4517      * <pre>
4518      * If present, safe-search annotation has completed successfully.
4519      * </pre>
4520      *
4521      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4522      */
4523     public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder
getSafeSearchAnnotationOrBuilder()4524         getSafeSearchAnnotationOrBuilder() {
4525       if (safeSearchAnnotationBuilder_ != null) {
4526         return safeSearchAnnotationBuilder_.getMessageOrBuilder();
4527       } else {
4528         return safeSearchAnnotation_ == null
4529             ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance()
4530             : safeSearchAnnotation_;
4531       }
4532     }
4533     /**
4534      *
4535      *
4536      * <pre>
4537      * If present, safe-search annotation has completed successfully.
4538      * </pre>
4539      *
4540      * <code>.google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;</code>
4541      */
4542     private com.google.protobuf.SingleFieldBuilderV3<
4543             com.google.cloud.vision.v1.SafeSearchAnnotation,
4544             com.google.cloud.vision.v1.SafeSearchAnnotation.Builder,
4545             com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>
getSafeSearchAnnotationFieldBuilder()4546         getSafeSearchAnnotationFieldBuilder() {
4547       if (safeSearchAnnotationBuilder_ == null) {
4548         safeSearchAnnotationBuilder_ =
4549             new com.google.protobuf.SingleFieldBuilderV3<
4550                 com.google.cloud.vision.v1.SafeSearchAnnotation,
4551                 com.google.cloud.vision.v1.SafeSearchAnnotation.Builder,
4552                 com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>(
4553                 getSafeSearchAnnotation(), getParentForChildren(), isClean());
4554         safeSearchAnnotation_ = null;
4555       }
4556       return safeSearchAnnotationBuilder_;
4557     }
4558 
4559     private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_;
4560     private com.google.protobuf.SingleFieldBuilderV3<
4561             com.google.cloud.vision.v1.ImageProperties,
4562             com.google.cloud.vision.v1.ImageProperties.Builder,
4563             com.google.cloud.vision.v1.ImagePropertiesOrBuilder>
4564         imagePropertiesAnnotationBuilder_;
4565     /**
4566      *
4567      *
4568      * <pre>
4569      * If present, image properties were extracted successfully.
4570      * </pre>
4571      *
4572      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4573      *
4574      * @return Whether the imagePropertiesAnnotation field is set.
4575      */
hasImagePropertiesAnnotation()4576     public boolean hasImagePropertiesAnnotation() {
4577       return ((bitField0_ & 0x00000100) != 0);
4578     }
4579     /**
4580      *
4581      *
4582      * <pre>
4583      * If present, image properties were extracted successfully.
4584      * </pre>
4585      *
4586      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4587      *
4588      * @return The imagePropertiesAnnotation.
4589      */
getImagePropertiesAnnotation()4590     public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() {
4591       if (imagePropertiesAnnotationBuilder_ == null) {
4592         return imagePropertiesAnnotation_ == null
4593             ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()
4594             : imagePropertiesAnnotation_;
4595       } else {
4596         return imagePropertiesAnnotationBuilder_.getMessage();
4597       }
4598     }
4599     /**
4600      *
4601      *
4602      * <pre>
4603      * If present, image properties were extracted successfully.
4604      * </pre>
4605      *
4606      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4607      */
setImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value)4608     public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) {
4609       if (imagePropertiesAnnotationBuilder_ == null) {
4610         if (value == null) {
4611           throw new NullPointerException();
4612         }
4613         imagePropertiesAnnotation_ = value;
4614       } else {
4615         imagePropertiesAnnotationBuilder_.setMessage(value);
4616       }
4617       bitField0_ |= 0x00000100;
4618       onChanged();
4619       return this;
4620     }
4621     /**
4622      *
4623      *
4624      * <pre>
4625      * If present, image properties were extracted successfully.
4626      * </pre>
4627      *
4628      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4629      */
setImagePropertiesAnnotation( com.google.cloud.vision.v1.ImageProperties.Builder builderForValue)4630     public Builder setImagePropertiesAnnotation(
4631         com.google.cloud.vision.v1.ImageProperties.Builder builderForValue) {
4632       if (imagePropertiesAnnotationBuilder_ == null) {
4633         imagePropertiesAnnotation_ = builderForValue.build();
4634       } else {
4635         imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build());
4636       }
4637       bitField0_ |= 0x00000100;
4638       onChanged();
4639       return this;
4640     }
4641     /**
4642      *
4643      *
4644      * <pre>
4645      * If present, image properties were extracted successfully.
4646      * </pre>
4647      *
4648      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4649      */
mergeImagePropertiesAnnotation( com.google.cloud.vision.v1.ImageProperties value)4650     public Builder mergeImagePropertiesAnnotation(
4651         com.google.cloud.vision.v1.ImageProperties value) {
4652       if (imagePropertiesAnnotationBuilder_ == null) {
4653         if (((bitField0_ & 0x00000100) != 0)
4654             && imagePropertiesAnnotation_ != null
4655             && imagePropertiesAnnotation_
4656                 != com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()) {
4657           getImagePropertiesAnnotationBuilder().mergeFrom(value);
4658         } else {
4659           imagePropertiesAnnotation_ = value;
4660         }
4661       } else {
4662         imagePropertiesAnnotationBuilder_.mergeFrom(value);
4663       }
4664       bitField0_ |= 0x00000100;
4665       onChanged();
4666       return this;
4667     }
4668     /**
4669      *
4670      *
4671      * <pre>
4672      * If present, image properties were extracted successfully.
4673      * </pre>
4674      *
4675      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4676      */
clearImagePropertiesAnnotation()4677     public Builder clearImagePropertiesAnnotation() {
4678       bitField0_ = (bitField0_ & ~0x00000100);
4679       imagePropertiesAnnotation_ = null;
4680       if (imagePropertiesAnnotationBuilder_ != null) {
4681         imagePropertiesAnnotationBuilder_.dispose();
4682         imagePropertiesAnnotationBuilder_ = null;
4683       }
4684       onChanged();
4685       return this;
4686     }
4687     /**
4688      *
4689      *
4690      * <pre>
4691      * If present, image properties were extracted successfully.
4692      * </pre>
4693      *
4694      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4695      */
4696     public com.google.cloud.vision.v1.ImageProperties.Builder
getImagePropertiesAnnotationBuilder()4697         getImagePropertiesAnnotationBuilder() {
4698       bitField0_ |= 0x00000100;
4699       onChanged();
4700       return getImagePropertiesAnnotationFieldBuilder().getBuilder();
4701     }
4702     /**
4703      *
4704      *
4705      * <pre>
4706      * If present, image properties were extracted successfully.
4707      * </pre>
4708      *
4709      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4710      */
4711     public com.google.cloud.vision.v1.ImagePropertiesOrBuilder
getImagePropertiesAnnotationOrBuilder()4712         getImagePropertiesAnnotationOrBuilder() {
4713       if (imagePropertiesAnnotationBuilder_ != null) {
4714         return imagePropertiesAnnotationBuilder_.getMessageOrBuilder();
4715       } else {
4716         return imagePropertiesAnnotation_ == null
4717             ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance()
4718             : imagePropertiesAnnotation_;
4719       }
4720     }
4721     /**
4722      *
4723      *
4724      * <pre>
4725      * If present, image properties were extracted successfully.
4726      * </pre>
4727      *
4728      * <code>.google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;</code>
4729      */
4730     private com.google.protobuf.SingleFieldBuilderV3<
4731             com.google.cloud.vision.v1.ImageProperties,
4732             com.google.cloud.vision.v1.ImageProperties.Builder,
4733             com.google.cloud.vision.v1.ImagePropertiesOrBuilder>
getImagePropertiesAnnotationFieldBuilder()4734         getImagePropertiesAnnotationFieldBuilder() {
4735       if (imagePropertiesAnnotationBuilder_ == null) {
4736         imagePropertiesAnnotationBuilder_ =
4737             new com.google.protobuf.SingleFieldBuilderV3<
4738                 com.google.cloud.vision.v1.ImageProperties,
4739                 com.google.cloud.vision.v1.ImageProperties.Builder,
4740                 com.google.cloud.vision.v1.ImagePropertiesOrBuilder>(
4741                 getImagePropertiesAnnotation(), getParentForChildren(), isClean());
4742         imagePropertiesAnnotation_ = null;
4743       }
4744       return imagePropertiesAnnotationBuilder_;
4745     }
4746 
4747     private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_;
4748     private com.google.protobuf.SingleFieldBuilderV3<
4749             com.google.cloud.vision.v1.CropHintsAnnotation,
4750             com.google.cloud.vision.v1.CropHintsAnnotation.Builder,
4751             com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder>
4752         cropHintsAnnotationBuilder_;
4753     /**
4754      *
4755      *
4756      * <pre>
4757      * If present, crop hints have completed successfully.
4758      * </pre>
4759      *
4760      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4761      *
4762      * @return Whether the cropHintsAnnotation field is set.
4763      */
hasCropHintsAnnotation()4764     public boolean hasCropHintsAnnotation() {
4765       return ((bitField0_ & 0x00000200) != 0);
4766     }
4767     /**
4768      *
4769      *
4770      * <pre>
4771      * If present, crop hints have completed successfully.
4772      * </pre>
4773      *
4774      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4775      *
4776      * @return The cropHintsAnnotation.
4777      */
getCropHintsAnnotation()4778     public com.google.cloud.vision.v1.CropHintsAnnotation getCropHintsAnnotation() {
4779       if (cropHintsAnnotationBuilder_ == null) {
4780         return cropHintsAnnotation_ == null
4781             ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()
4782             : cropHintsAnnotation_;
4783       } else {
4784         return cropHintsAnnotationBuilder_.getMessage();
4785       }
4786     }
4787     /**
4788      *
4789      *
4790      * <pre>
4791      * If present, crop hints have completed successfully.
4792      * </pre>
4793      *
4794      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4795      */
setCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value)4796     public Builder setCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) {
4797       if (cropHintsAnnotationBuilder_ == null) {
4798         if (value == null) {
4799           throw new NullPointerException();
4800         }
4801         cropHintsAnnotation_ = value;
4802       } else {
4803         cropHintsAnnotationBuilder_.setMessage(value);
4804       }
4805       bitField0_ |= 0x00000200;
4806       onChanged();
4807       return this;
4808     }
4809     /**
4810      *
4811      *
4812      * <pre>
4813      * If present, crop hints have completed successfully.
4814      * </pre>
4815      *
4816      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4817      */
setCropHintsAnnotation( com.google.cloud.vision.v1.CropHintsAnnotation.Builder builderForValue)4818     public Builder setCropHintsAnnotation(
4819         com.google.cloud.vision.v1.CropHintsAnnotation.Builder builderForValue) {
4820       if (cropHintsAnnotationBuilder_ == null) {
4821         cropHintsAnnotation_ = builderForValue.build();
4822       } else {
4823         cropHintsAnnotationBuilder_.setMessage(builderForValue.build());
4824       }
4825       bitField0_ |= 0x00000200;
4826       onChanged();
4827       return this;
4828     }
4829     /**
4830      *
4831      *
4832      * <pre>
4833      * If present, crop hints have completed successfully.
4834      * </pre>
4835      *
4836      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4837      */
mergeCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value)4838     public Builder mergeCropHintsAnnotation(com.google.cloud.vision.v1.CropHintsAnnotation value) {
4839       if (cropHintsAnnotationBuilder_ == null) {
4840         if (((bitField0_ & 0x00000200) != 0)
4841             && cropHintsAnnotation_ != null
4842             && cropHintsAnnotation_
4843                 != com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()) {
4844           getCropHintsAnnotationBuilder().mergeFrom(value);
4845         } else {
4846           cropHintsAnnotation_ = value;
4847         }
4848       } else {
4849         cropHintsAnnotationBuilder_.mergeFrom(value);
4850       }
4851       bitField0_ |= 0x00000200;
4852       onChanged();
4853       return this;
4854     }
4855     /**
4856      *
4857      *
4858      * <pre>
4859      * If present, crop hints have completed successfully.
4860      * </pre>
4861      *
4862      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4863      */
clearCropHintsAnnotation()4864     public Builder clearCropHintsAnnotation() {
4865       bitField0_ = (bitField0_ & ~0x00000200);
4866       cropHintsAnnotation_ = null;
4867       if (cropHintsAnnotationBuilder_ != null) {
4868         cropHintsAnnotationBuilder_.dispose();
4869         cropHintsAnnotationBuilder_ = null;
4870       }
4871       onChanged();
4872       return this;
4873     }
4874     /**
4875      *
4876      *
4877      * <pre>
4878      * If present, crop hints have completed successfully.
4879      * </pre>
4880      *
4881      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4882      */
getCropHintsAnnotationBuilder()4883     public com.google.cloud.vision.v1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() {
4884       bitField0_ |= 0x00000200;
4885       onChanged();
4886       return getCropHintsAnnotationFieldBuilder().getBuilder();
4887     }
4888     /**
4889      *
4890      *
4891      * <pre>
4892      * If present, crop hints have completed successfully.
4893      * </pre>
4894      *
4895      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4896      */
4897     public com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder
getCropHintsAnnotationOrBuilder()4898         getCropHintsAnnotationOrBuilder() {
4899       if (cropHintsAnnotationBuilder_ != null) {
4900         return cropHintsAnnotationBuilder_.getMessageOrBuilder();
4901       } else {
4902         return cropHintsAnnotation_ == null
4903             ? com.google.cloud.vision.v1.CropHintsAnnotation.getDefaultInstance()
4904             : cropHintsAnnotation_;
4905       }
4906     }
4907     /**
4908      *
4909      *
4910      * <pre>
4911      * If present, crop hints have completed successfully.
4912      * </pre>
4913      *
4914      * <code>.google.cloud.vision.v1.CropHintsAnnotation crop_hints_annotation = 11;</code>
4915      */
4916     private com.google.protobuf.SingleFieldBuilderV3<
4917             com.google.cloud.vision.v1.CropHintsAnnotation,
4918             com.google.cloud.vision.v1.CropHintsAnnotation.Builder,
4919             com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder>
getCropHintsAnnotationFieldBuilder()4920         getCropHintsAnnotationFieldBuilder() {
4921       if (cropHintsAnnotationBuilder_ == null) {
4922         cropHintsAnnotationBuilder_ =
4923             new com.google.protobuf.SingleFieldBuilderV3<
4924                 com.google.cloud.vision.v1.CropHintsAnnotation,
4925                 com.google.cloud.vision.v1.CropHintsAnnotation.Builder,
4926                 com.google.cloud.vision.v1.CropHintsAnnotationOrBuilder>(
4927                 getCropHintsAnnotation(), getParentForChildren(), isClean());
4928         cropHintsAnnotation_ = null;
4929       }
4930       return cropHintsAnnotationBuilder_;
4931     }
4932 
4933     private com.google.cloud.vision.v1.WebDetection webDetection_;
4934     private com.google.protobuf.SingleFieldBuilderV3<
4935             com.google.cloud.vision.v1.WebDetection,
4936             com.google.cloud.vision.v1.WebDetection.Builder,
4937             com.google.cloud.vision.v1.WebDetectionOrBuilder>
4938         webDetectionBuilder_;
4939     /**
4940      *
4941      *
4942      * <pre>
4943      * If present, web detection has completed successfully.
4944      * </pre>
4945      *
4946      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
4947      *
4948      * @return Whether the webDetection field is set.
4949      */
hasWebDetection()4950     public boolean hasWebDetection() {
4951       return ((bitField0_ & 0x00000400) != 0);
4952     }
4953     /**
4954      *
4955      *
4956      * <pre>
4957      * If present, web detection has completed successfully.
4958      * </pre>
4959      *
4960      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
4961      *
4962      * @return The webDetection.
4963      */
getWebDetection()4964     public com.google.cloud.vision.v1.WebDetection getWebDetection() {
4965       if (webDetectionBuilder_ == null) {
4966         return webDetection_ == null
4967             ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance()
4968             : webDetection_;
4969       } else {
4970         return webDetectionBuilder_.getMessage();
4971       }
4972     }
4973     /**
4974      *
4975      *
4976      * <pre>
4977      * If present, web detection has completed successfully.
4978      * </pre>
4979      *
4980      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
4981      */
setWebDetection(com.google.cloud.vision.v1.WebDetection value)4982     public Builder setWebDetection(com.google.cloud.vision.v1.WebDetection value) {
4983       if (webDetectionBuilder_ == null) {
4984         if (value == null) {
4985           throw new NullPointerException();
4986         }
4987         webDetection_ = value;
4988       } else {
4989         webDetectionBuilder_.setMessage(value);
4990       }
4991       bitField0_ |= 0x00000400;
4992       onChanged();
4993       return this;
4994     }
4995     /**
4996      *
4997      *
4998      * <pre>
4999      * If present, web detection has completed successfully.
5000      * </pre>
5001      *
5002      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5003      */
setWebDetection( com.google.cloud.vision.v1.WebDetection.Builder builderForValue)5004     public Builder setWebDetection(
5005         com.google.cloud.vision.v1.WebDetection.Builder builderForValue) {
5006       if (webDetectionBuilder_ == null) {
5007         webDetection_ = builderForValue.build();
5008       } else {
5009         webDetectionBuilder_.setMessage(builderForValue.build());
5010       }
5011       bitField0_ |= 0x00000400;
5012       onChanged();
5013       return this;
5014     }
5015     /**
5016      *
5017      *
5018      * <pre>
5019      * If present, web detection has completed successfully.
5020      * </pre>
5021      *
5022      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5023      */
mergeWebDetection(com.google.cloud.vision.v1.WebDetection value)5024     public Builder mergeWebDetection(com.google.cloud.vision.v1.WebDetection value) {
5025       if (webDetectionBuilder_ == null) {
5026         if (((bitField0_ & 0x00000400) != 0)
5027             && webDetection_ != null
5028             && webDetection_ != com.google.cloud.vision.v1.WebDetection.getDefaultInstance()) {
5029           getWebDetectionBuilder().mergeFrom(value);
5030         } else {
5031           webDetection_ = value;
5032         }
5033       } else {
5034         webDetectionBuilder_.mergeFrom(value);
5035       }
5036       bitField0_ |= 0x00000400;
5037       onChanged();
5038       return this;
5039     }
5040     /**
5041      *
5042      *
5043      * <pre>
5044      * If present, web detection has completed successfully.
5045      * </pre>
5046      *
5047      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5048      */
clearWebDetection()5049     public Builder clearWebDetection() {
5050       bitField0_ = (bitField0_ & ~0x00000400);
5051       webDetection_ = null;
5052       if (webDetectionBuilder_ != null) {
5053         webDetectionBuilder_.dispose();
5054         webDetectionBuilder_ = null;
5055       }
5056       onChanged();
5057       return this;
5058     }
5059     /**
5060      *
5061      *
5062      * <pre>
5063      * If present, web detection has completed successfully.
5064      * </pre>
5065      *
5066      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5067      */
getWebDetectionBuilder()5068     public com.google.cloud.vision.v1.WebDetection.Builder getWebDetectionBuilder() {
5069       bitField0_ |= 0x00000400;
5070       onChanged();
5071       return getWebDetectionFieldBuilder().getBuilder();
5072     }
5073     /**
5074      *
5075      *
5076      * <pre>
5077      * If present, web detection has completed successfully.
5078      * </pre>
5079      *
5080      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5081      */
getWebDetectionOrBuilder()5082     public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder() {
5083       if (webDetectionBuilder_ != null) {
5084         return webDetectionBuilder_.getMessageOrBuilder();
5085       } else {
5086         return webDetection_ == null
5087             ? com.google.cloud.vision.v1.WebDetection.getDefaultInstance()
5088             : webDetection_;
5089       }
5090     }
5091     /**
5092      *
5093      *
5094      * <pre>
5095      * If present, web detection has completed successfully.
5096      * </pre>
5097      *
5098      * <code>.google.cloud.vision.v1.WebDetection web_detection = 13;</code>
5099      */
5100     private com.google.protobuf.SingleFieldBuilderV3<
5101             com.google.cloud.vision.v1.WebDetection,
5102             com.google.cloud.vision.v1.WebDetection.Builder,
5103             com.google.cloud.vision.v1.WebDetectionOrBuilder>
getWebDetectionFieldBuilder()5104         getWebDetectionFieldBuilder() {
5105       if (webDetectionBuilder_ == null) {
5106         webDetectionBuilder_ =
5107             new com.google.protobuf.SingleFieldBuilderV3<
5108                 com.google.cloud.vision.v1.WebDetection,
5109                 com.google.cloud.vision.v1.WebDetection.Builder,
5110                 com.google.cloud.vision.v1.WebDetectionOrBuilder>(
5111                 getWebDetection(), getParentForChildren(), isClean());
5112         webDetection_ = null;
5113       }
5114       return webDetectionBuilder_;
5115     }
5116 
5117     private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_;
5118     private com.google.protobuf.SingleFieldBuilderV3<
5119             com.google.cloud.vision.v1.ProductSearchResults,
5120             com.google.cloud.vision.v1.ProductSearchResults.Builder,
5121             com.google.cloud.vision.v1.ProductSearchResultsOrBuilder>
5122         productSearchResultsBuilder_;
5123     /**
5124      *
5125      *
5126      * <pre>
5127      * If present, product search has completed successfully.
5128      * </pre>
5129      *
5130      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5131      *
5132      * @return Whether the productSearchResults field is set.
5133      */
hasProductSearchResults()5134     public boolean hasProductSearchResults() {
5135       return ((bitField0_ & 0x00000800) != 0);
5136     }
5137     /**
5138      *
5139      *
5140      * <pre>
5141      * If present, product search has completed successfully.
5142      * </pre>
5143      *
5144      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5145      *
5146      * @return The productSearchResults.
5147      */
getProductSearchResults()5148     public com.google.cloud.vision.v1.ProductSearchResults getProductSearchResults() {
5149       if (productSearchResultsBuilder_ == null) {
5150         return productSearchResults_ == null
5151             ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()
5152             : productSearchResults_;
5153       } else {
5154         return productSearchResultsBuilder_.getMessage();
5155       }
5156     }
5157     /**
5158      *
5159      *
5160      * <pre>
5161      * If present, product search has completed successfully.
5162      * </pre>
5163      *
5164      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5165      */
setProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value)5166     public Builder setProductSearchResults(com.google.cloud.vision.v1.ProductSearchResults value) {
5167       if (productSearchResultsBuilder_ == null) {
5168         if (value == null) {
5169           throw new NullPointerException();
5170         }
5171         productSearchResults_ = value;
5172       } else {
5173         productSearchResultsBuilder_.setMessage(value);
5174       }
5175       bitField0_ |= 0x00000800;
5176       onChanged();
5177       return this;
5178     }
5179     /**
5180      *
5181      *
5182      * <pre>
5183      * If present, product search has completed successfully.
5184      * </pre>
5185      *
5186      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5187      */
setProductSearchResults( com.google.cloud.vision.v1.ProductSearchResults.Builder builderForValue)5188     public Builder setProductSearchResults(
5189         com.google.cloud.vision.v1.ProductSearchResults.Builder builderForValue) {
5190       if (productSearchResultsBuilder_ == null) {
5191         productSearchResults_ = builderForValue.build();
5192       } else {
5193         productSearchResultsBuilder_.setMessage(builderForValue.build());
5194       }
5195       bitField0_ |= 0x00000800;
5196       onChanged();
5197       return this;
5198     }
5199     /**
5200      *
5201      *
5202      * <pre>
5203      * If present, product search has completed successfully.
5204      * </pre>
5205      *
5206      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5207      */
mergeProductSearchResults( com.google.cloud.vision.v1.ProductSearchResults value)5208     public Builder mergeProductSearchResults(
5209         com.google.cloud.vision.v1.ProductSearchResults value) {
5210       if (productSearchResultsBuilder_ == null) {
5211         if (((bitField0_ & 0x00000800) != 0)
5212             && productSearchResults_ != null
5213             && productSearchResults_
5214                 != com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()) {
5215           getProductSearchResultsBuilder().mergeFrom(value);
5216         } else {
5217           productSearchResults_ = value;
5218         }
5219       } else {
5220         productSearchResultsBuilder_.mergeFrom(value);
5221       }
5222       bitField0_ |= 0x00000800;
5223       onChanged();
5224       return this;
5225     }
5226     /**
5227      *
5228      *
5229      * <pre>
5230      * If present, product search has completed successfully.
5231      * </pre>
5232      *
5233      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5234      */
clearProductSearchResults()5235     public Builder clearProductSearchResults() {
5236       bitField0_ = (bitField0_ & ~0x00000800);
5237       productSearchResults_ = null;
5238       if (productSearchResultsBuilder_ != null) {
5239         productSearchResultsBuilder_.dispose();
5240         productSearchResultsBuilder_ = null;
5241       }
5242       onChanged();
5243       return this;
5244     }
5245     /**
5246      *
5247      *
5248      * <pre>
5249      * If present, product search has completed successfully.
5250      * </pre>
5251      *
5252      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5253      */
5254     public com.google.cloud.vision.v1.ProductSearchResults.Builder
getProductSearchResultsBuilder()5255         getProductSearchResultsBuilder() {
5256       bitField0_ |= 0x00000800;
5257       onChanged();
5258       return getProductSearchResultsFieldBuilder().getBuilder();
5259     }
5260     /**
5261      *
5262      *
5263      * <pre>
5264      * If present, product search has completed successfully.
5265      * </pre>
5266      *
5267      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5268      */
5269     public com.google.cloud.vision.v1.ProductSearchResultsOrBuilder
getProductSearchResultsOrBuilder()5270         getProductSearchResultsOrBuilder() {
5271       if (productSearchResultsBuilder_ != null) {
5272         return productSearchResultsBuilder_.getMessageOrBuilder();
5273       } else {
5274         return productSearchResults_ == null
5275             ? com.google.cloud.vision.v1.ProductSearchResults.getDefaultInstance()
5276             : productSearchResults_;
5277       }
5278     }
5279     /**
5280      *
5281      *
5282      * <pre>
5283      * If present, product search has completed successfully.
5284      * </pre>
5285      *
5286      * <code>.google.cloud.vision.v1.ProductSearchResults product_search_results = 14;</code>
5287      */
5288     private com.google.protobuf.SingleFieldBuilderV3<
5289             com.google.cloud.vision.v1.ProductSearchResults,
5290             com.google.cloud.vision.v1.ProductSearchResults.Builder,
5291             com.google.cloud.vision.v1.ProductSearchResultsOrBuilder>
getProductSearchResultsFieldBuilder()5292         getProductSearchResultsFieldBuilder() {
5293       if (productSearchResultsBuilder_ == null) {
5294         productSearchResultsBuilder_ =
5295             new com.google.protobuf.SingleFieldBuilderV3<
5296                 com.google.cloud.vision.v1.ProductSearchResults,
5297                 com.google.cloud.vision.v1.ProductSearchResults.Builder,
5298                 com.google.cloud.vision.v1.ProductSearchResultsOrBuilder>(
5299                 getProductSearchResults(), getParentForChildren(), isClean());
5300         productSearchResults_ = null;
5301       }
5302       return productSearchResultsBuilder_;
5303     }
5304 
5305     private com.google.rpc.Status error_;
5306     private com.google.protobuf.SingleFieldBuilderV3<
5307             com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
5308         errorBuilder_;
5309     /**
5310      *
5311      *
5312      * <pre>
5313      * If set, represents the error message for the operation.
5314      * Note that filled-in image annotations are guaranteed to be
5315      * correct, even when `error` is set.
5316      * </pre>
5317      *
5318      * <code>.google.rpc.Status error = 9;</code>
5319      *
5320      * @return Whether the error field is set.
5321      */
hasError()5322     public boolean hasError() {
5323       return ((bitField0_ & 0x00001000) != 0);
5324     }
5325     /**
5326      *
5327      *
5328      * <pre>
5329      * If set, represents the error message for the operation.
5330      * Note that filled-in image annotations are guaranteed to be
5331      * correct, even when `error` is set.
5332      * </pre>
5333      *
5334      * <code>.google.rpc.Status error = 9;</code>
5335      *
5336      * @return The error.
5337      */
getError()5338     public com.google.rpc.Status getError() {
5339       if (errorBuilder_ == null) {
5340         return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
5341       } else {
5342         return errorBuilder_.getMessage();
5343       }
5344     }
5345     /**
5346      *
5347      *
5348      * <pre>
5349      * If set, represents the error message for the operation.
5350      * Note that filled-in image annotations are guaranteed to be
5351      * correct, even when `error` is set.
5352      * </pre>
5353      *
5354      * <code>.google.rpc.Status error = 9;</code>
5355      */
setError(com.google.rpc.Status value)5356     public Builder setError(com.google.rpc.Status value) {
5357       if (errorBuilder_ == null) {
5358         if (value == null) {
5359           throw new NullPointerException();
5360         }
5361         error_ = value;
5362       } else {
5363         errorBuilder_.setMessage(value);
5364       }
5365       bitField0_ |= 0x00001000;
5366       onChanged();
5367       return this;
5368     }
5369     /**
5370      *
5371      *
5372      * <pre>
5373      * If set, represents the error message for the operation.
5374      * Note that filled-in image annotations are guaranteed to be
5375      * correct, even when `error` is set.
5376      * </pre>
5377      *
5378      * <code>.google.rpc.Status error = 9;</code>
5379      */
setError(com.google.rpc.Status.Builder builderForValue)5380     public Builder setError(com.google.rpc.Status.Builder builderForValue) {
5381       if (errorBuilder_ == null) {
5382         error_ = builderForValue.build();
5383       } else {
5384         errorBuilder_.setMessage(builderForValue.build());
5385       }
5386       bitField0_ |= 0x00001000;
5387       onChanged();
5388       return this;
5389     }
5390     /**
5391      *
5392      *
5393      * <pre>
5394      * If set, represents the error message for the operation.
5395      * Note that filled-in image annotations are guaranteed to be
5396      * correct, even when `error` is set.
5397      * </pre>
5398      *
5399      * <code>.google.rpc.Status error = 9;</code>
5400      */
mergeError(com.google.rpc.Status value)5401     public Builder mergeError(com.google.rpc.Status value) {
5402       if (errorBuilder_ == null) {
5403         if (((bitField0_ & 0x00001000) != 0)
5404             && error_ != null
5405             && error_ != com.google.rpc.Status.getDefaultInstance()) {
5406           getErrorBuilder().mergeFrom(value);
5407         } else {
5408           error_ = value;
5409         }
5410       } else {
5411         errorBuilder_.mergeFrom(value);
5412       }
5413       bitField0_ |= 0x00001000;
5414       onChanged();
5415       return this;
5416     }
5417     /**
5418      *
5419      *
5420      * <pre>
5421      * If set, represents the error message for the operation.
5422      * Note that filled-in image annotations are guaranteed to be
5423      * correct, even when `error` is set.
5424      * </pre>
5425      *
5426      * <code>.google.rpc.Status error = 9;</code>
5427      */
clearError()5428     public Builder clearError() {
5429       bitField0_ = (bitField0_ & ~0x00001000);
5430       error_ = null;
5431       if (errorBuilder_ != null) {
5432         errorBuilder_.dispose();
5433         errorBuilder_ = null;
5434       }
5435       onChanged();
5436       return this;
5437     }
5438     /**
5439      *
5440      *
5441      * <pre>
5442      * If set, represents the error message for the operation.
5443      * Note that filled-in image annotations are guaranteed to be
5444      * correct, even when `error` is set.
5445      * </pre>
5446      *
5447      * <code>.google.rpc.Status error = 9;</code>
5448      */
getErrorBuilder()5449     public com.google.rpc.Status.Builder getErrorBuilder() {
5450       bitField0_ |= 0x00001000;
5451       onChanged();
5452       return getErrorFieldBuilder().getBuilder();
5453     }
5454     /**
5455      *
5456      *
5457      * <pre>
5458      * If set, represents the error message for the operation.
5459      * Note that filled-in image annotations are guaranteed to be
5460      * correct, even when `error` is set.
5461      * </pre>
5462      *
5463      * <code>.google.rpc.Status error = 9;</code>
5464      */
getErrorOrBuilder()5465     public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
5466       if (errorBuilder_ != null) {
5467         return errorBuilder_.getMessageOrBuilder();
5468       } else {
5469         return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
5470       }
5471     }
5472     /**
5473      *
5474      *
5475      * <pre>
5476      * If set, represents the error message for the operation.
5477      * Note that filled-in image annotations are guaranteed to be
5478      * correct, even when `error` is set.
5479      * </pre>
5480      *
5481      * <code>.google.rpc.Status error = 9;</code>
5482      */
5483     private com.google.protobuf.SingleFieldBuilderV3<
5484             com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getErrorFieldBuilder()5485         getErrorFieldBuilder() {
5486       if (errorBuilder_ == null) {
5487         errorBuilder_ =
5488             new com.google.protobuf.SingleFieldBuilderV3<
5489                 com.google.rpc.Status,
5490                 com.google.rpc.Status.Builder,
5491                 com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean());
5492         error_ = null;
5493       }
5494       return errorBuilder_;
5495     }
5496 
5497     private com.google.cloud.vision.v1.ImageAnnotationContext context_;
5498     private com.google.protobuf.SingleFieldBuilderV3<
5499             com.google.cloud.vision.v1.ImageAnnotationContext,
5500             com.google.cloud.vision.v1.ImageAnnotationContext.Builder,
5501             com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder>
5502         contextBuilder_;
5503     /**
5504      *
5505      *
5506      * <pre>
5507      * If present, contextual information is needed to understand where this image
5508      * comes from.
5509      * </pre>
5510      *
5511      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5512      *
5513      * @return Whether the context field is set.
5514      */
hasContext()5515     public boolean hasContext() {
5516       return ((bitField0_ & 0x00002000) != 0);
5517     }
5518     /**
5519      *
5520      *
5521      * <pre>
5522      * If present, contextual information is needed to understand where this image
5523      * comes from.
5524      * </pre>
5525      *
5526      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5527      *
5528      * @return The context.
5529      */
getContext()5530     public com.google.cloud.vision.v1.ImageAnnotationContext getContext() {
5531       if (contextBuilder_ == null) {
5532         return context_ == null
5533             ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()
5534             : context_;
5535       } else {
5536         return contextBuilder_.getMessage();
5537       }
5538     }
5539     /**
5540      *
5541      *
5542      * <pre>
5543      * If present, contextual information is needed to understand where this image
5544      * comes from.
5545      * </pre>
5546      *
5547      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5548      */
setContext(com.google.cloud.vision.v1.ImageAnnotationContext value)5549     public Builder setContext(com.google.cloud.vision.v1.ImageAnnotationContext value) {
5550       if (contextBuilder_ == null) {
5551         if (value == null) {
5552           throw new NullPointerException();
5553         }
5554         context_ = value;
5555       } else {
5556         contextBuilder_.setMessage(value);
5557       }
5558       bitField0_ |= 0x00002000;
5559       onChanged();
5560       return this;
5561     }
5562     /**
5563      *
5564      *
5565      * <pre>
5566      * If present, contextual information is needed to understand where this image
5567      * comes from.
5568      * </pre>
5569      *
5570      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5571      */
setContext( com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue)5572     public Builder setContext(
5573         com.google.cloud.vision.v1.ImageAnnotationContext.Builder builderForValue) {
5574       if (contextBuilder_ == null) {
5575         context_ = builderForValue.build();
5576       } else {
5577         contextBuilder_.setMessage(builderForValue.build());
5578       }
5579       bitField0_ |= 0x00002000;
5580       onChanged();
5581       return this;
5582     }
5583     /**
5584      *
5585      *
5586      * <pre>
5587      * If present, contextual information is needed to understand where this image
5588      * comes from.
5589      * </pre>
5590      *
5591      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5592      */
mergeContext(com.google.cloud.vision.v1.ImageAnnotationContext value)5593     public Builder mergeContext(com.google.cloud.vision.v1.ImageAnnotationContext value) {
5594       if (contextBuilder_ == null) {
5595         if (((bitField0_ & 0x00002000) != 0)
5596             && context_ != null
5597             && context_ != com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()) {
5598           getContextBuilder().mergeFrom(value);
5599         } else {
5600           context_ = value;
5601         }
5602       } else {
5603         contextBuilder_.mergeFrom(value);
5604       }
5605       bitField0_ |= 0x00002000;
5606       onChanged();
5607       return this;
5608     }
5609     /**
5610      *
5611      *
5612      * <pre>
5613      * If present, contextual information is needed to understand where this image
5614      * comes from.
5615      * </pre>
5616      *
5617      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5618      */
clearContext()5619     public Builder clearContext() {
5620       bitField0_ = (bitField0_ & ~0x00002000);
5621       context_ = null;
5622       if (contextBuilder_ != null) {
5623         contextBuilder_.dispose();
5624         contextBuilder_ = null;
5625       }
5626       onChanged();
5627       return this;
5628     }
5629     /**
5630      *
5631      *
5632      * <pre>
5633      * If present, contextual information is needed to understand where this image
5634      * comes from.
5635      * </pre>
5636      *
5637      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5638      */
getContextBuilder()5639     public com.google.cloud.vision.v1.ImageAnnotationContext.Builder getContextBuilder() {
5640       bitField0_ |= 0x00002000;
5641       onChanged();
5642       return getContextFieldBuilder().getBuilder();
5643     }
5644     /**
5645      *
5646      *
5647      * <pre>
5648      * If present, contextual information is needed to understand where this image
5649      * comes from.
5650      * </pre>
5651      *
5652      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5653      */
getContextOrBuilder()5654     public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBuilder() {
5655       if (contextBuilder_ != null) {
5656         return contextBuilder_.getMessageOrBuilder();
5657       } else {
5658         return context_ == null
5659             ? com.google.cloud.vision.v1.ImageAnnotationContext.getDefaultInstance()
5660             : context_;
5661       }
5662     }
5663     /**
5664      *
5665      *
5666      * <pre>
5667      * If present, contextual information is needed to understand where this image
5668      * comes from.
5669      * </pre>
5670      *
5671      * <code>.google.cloud.vision.v1.ImageAnnotationContext context = 21;</code>
5672      */
5673     private com.google.protobuf.SingleFieldBuilderV3<
5674             com.google.cloud.vision.v1.ImageAnnotationContext,
5675             com.google.cloud.vision.v1.ImageAnnotationContext.Builder,
5676             com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder>
getContextFieldBuilder()5677         getContextFieldBuilder() {
5678       if (contextBuilder_ == null) {
5679         contextBuilder_ =
5680             new com.google.protobuf.SingleFieldBuilderV3<
5681                 com.google.cloud.vision.v1.ImageAnnotationContext,
5682                 com.google.cloud.vision.v1.ImageAnnotationContext.Builder,
5683                 com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder>(
5684                 getContext(), getParentForChildren(), isClean());
5685         context_ = null;
5686       }
5687       return contextBuilder_;
5688     }
5689 
5690     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)5691     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
5692       return super.setUnknownFields(unknownFields);
5693     }
5694 
5695     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)5696     public final Builder mergeUnknownFields(
5697         final com.google.protobuf.UnknownFieldSet unknownFields) {
5698       return super.mergeUnknownFields(unknownFields);
5699     }
5700 
5701     // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageResponse)
5702   }
5703 
5704   // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageResponse)
5705   private static final com.google.cloud.vision.v1.AnnotateImageResponse DEFAULT_INSTANCE;
5706 
5707   static {
5708     DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageResponse();
5709   }
5710 
getDefaultInstance()5711   public static com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstance() {
5712     return DEFAULT_INSTANCE;
5713   }
5714 
5715   private static final com.google.protobuf.Parser<AnnotateImageResponse> PARSER =
5716       new com.google.protobuf.AbstractParser<AnnotateImageResponse>() {
5717         @java.lang.Override
5718         public AnnotateImageResponse parsePartialFrom(
5719             com.google.protobuf.CodedInputStream input,
5720             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
5721             throws com.google.protobuf.InvalidProtocolBufferException {
5722           Builder builder = newBuilder();
5723           try {
5724             builder.mergeFrom(input, extensionRegistry);
5725           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
5726             throw e.setUnfinishedMessage(builder.buildPartial());
5727           } catch (com.google.protobuf.UninitializedMessageException e) {
5728             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
5729           } catch (java.io.IOException e) {
5730             throw new com.google.protobuf.InvalidProtocolBufferException(e)
5731                 .setUnfinishedMessage(builder.buildPartial());
5732           }
5733           return builder.buildPartial();
5734         }
5735       };
5736 
parser()5737   public static com.google.protobuf.Parser<AnnotateImageResponse> parser() {
5738     return PARSER;
5739   }
5740 
5741   @java.lang.Override
getParserForType()5742   public com.google.protobuf.Parser<AnnotateImageResponse> getParserForType() {
5743     return PARSER;
5744   }
5745 
5746   @java.lang.Override
getDefaultInstanceForType()5747   public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() {
5748     return DEFAULT_INSTANCE;
5749   }
5750 }
5751