• 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  * A face annotation object contains the results of face detection.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation}
29  */
30 public final class FaceAnnotation extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation)
33     FaceAnnotationOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use FaceAnnotation.newBuilder() to construct.
FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
FaceAnnotation()40   private FaceAnnotation() {
41     landmarks_ = java.util.Collections.emptyList();
42     joyLikelihood_ = 0;
43     sorrowLikelihood_ = 0;
44     angerLikelihood_ = 0;
45     surpriseLikelihood_ = 0;
46     underExposedLikelihood_ = 0;
47     blurredLikelihood_ = 0;
48     headwearLikelihood_ = 0;
49   }
50 
51   @java.lang.Override
52   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)53   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
54     return new FaceAnnotation();
55   }
56 
57   @java.lang.Override
getUnknownFields()58   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59     return this.unknownFields;
60   }
61 
getDescriptor()62   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
63     return com.google.cloud.vision.v1.ImageAnnotatorProto
64         .internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor;
65   }
66 
67   @java.lang.Override
68   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()69       internalGetFieldAccessorTable() {
70     return com.google.cloud.vision.v1.ImageAnnotatorProto
71         .internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable
72         .ensureFieldAccessorsInitialized(
73             com.google.cloud.vision.v1.FaceAnnotation.class,
74             com.google.cloud.vision.v1.FaceAnnotation.Builder.class);
75   }
76 
77   public interface LandmarkOrBuilder
78       extends
79       // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1.FaceAnnotation.Landmark)
80       com.google.protobuf.MessageOrBuilder {
81 
82     /**
83      *
84      *
85      * <pre>
86      * Face landmark type.
87      * </pre>
88      *
89      * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
90      *
91      * @return The enum numeric value on the wire for type.
92      */
getTypeValue()93     int getTypeValue();
94     /**
95      *
96      *
97      * <pre>
98      * Face landmark type.
99      * </pre>
100      *
101      * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
102      *
103      * @return The type.
104      */
getType()105     com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType();
106 
107     /**
108      *
109      *
110      * <pre>
111      * Face landmark position.
112      * </pre>
113      *
114      * <code>.google.cloud.vision.v1.Position position = 4;</code>
115      *
116      * @return Whether the position field is set.
117      */
hasPosition()118     boolean hasPosition();
119     /**
120      *
121      *
122      * <pre>
123      * Face landmark position.
124      * </pre>
125      *
126      * <code>.google.cloud.vision.v1.Position position = 4;</code>
127      *
128      * @return The position.
129      */
getPosition()130     com.google.cloud.vision.v1.Position getPosition();
131     /**
132      *
133      *
134      * <pre>
135      * Face landmark position.
136      * </pre>
137      *
138      * <code>.google.cloud.vision.v1.Position position = 4;</code>
139      */
getPositionOrBuilder()140     com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder();
141   }
142   /**
143    *
144    *
145    * <pre>
146    * A face-specific landmark (for example, a face feature).
147    * </pre>
148    *
149    * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark}
150    */
151   public static final class Landmark extends com.google.protobuf.GeneratedMessageV3
152       implements
153       // @@protoc_insertion_point(message_implements:google.cloud.vision.v1.FaceAnnotation.Landmark)
154       LandmarkOrBuilder {
155     private static final long serialVersionUID = 0L;
156     // Use Landmark.newBuilder() to construct.
Landmark(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)157     private Landmark(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
158       super(builder);
159     }
160 
Landmark()161     private Landmark() {
162       type_ = 0;
163     }
164 
165     @java.lang.Override
166     @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)167     protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
168       return new Landmark();
169     }
170 
171     @java.lang.Override
getUnknownFields()172     public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
173       return this.unknownFields;
174     }
175 
getDescriptor()176     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
177       return com.google.cloud.vision.v1.ImageAnnotatorProto
178           .internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor;
179     }
180 
181     @java.lang.Override
182     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()183         internalGetFieldAccessorTable() {
184       return com.google.cloud.vision.v1.ImageAnnotatorProto
185           .internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable
186           .ensureFieldAccessorsInitialized(
187               com.google.cloud.vision.v1.FaceAnnotation.Landmark.class,
188               com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class);
189     }
190 
191     /**
192      *
193      *
194      * <pre>
195      * Face landmark (feature) type.
196      * Left and right are defined from the vantage of the viewer of the image
197      * without considering mirror projections typical of photos. So, `LEFT_EYE`,
198      * typically, is the person's right eye.
199      * </pre>
200      *
201      * Protobuf enum {@code google.cloud.vision.v1.FaceAnnotation.Landmark.Type}
202      */
203     public enum Type implements com.google.protobuf.ProtocolMessageEnum {
204       /**
205        *
206        *
207        * <pre>
208        * Unknown face landmark detected. Should not be filled.
209        * </pre>
210        *
211        * <code>UNKNOWN_LANDMARK = 0;</code>
212        */
213       UNKNOWN_LANDMARK(0),
214       /**
215        *
216        *
217        * <pre>
218        * Left eye.
219        * </pre>
220        *
221        * <code>LEFT_EYE = 1;</code>
222        */
223       LEFT_EYE(1),
224       /**
225        *
226        *
227        * <pre>
228        * Right eye.
229        * </pre>
230        *
231        * <code>RIGHT_EYE = 2;</code>
232        */
233       RIGHT_EYE(2),
234       /**
235        *
236        *
237        * <pre>
238        * Left of left eyebrow.
239        * </pre>
240        *
241        * <code>LEFT_OF_LEFT_EYEBROW = 3;</code>
242        */
243       LEFT_OF_LEFT_EYEBROW(3),
244       /**
245        *
246        *
247        * <pre>
248        * Right of left eyebrow.
249        * </pre>
250        *
251        * <code>RIGHT_OF_LEFT_EYEBROW = 4;</code>
252        */
253       RIGHT_OF_LEFT_EYEBROW(4),
254       /**
255        *
256        *
257        * <pre>
258        * Left of right eyebrow.
259        * </pre>
260        *
261        * <code>LEFT_OF_RIGHT_EYEBROW = 5;</code>
262        */
263       LEFT_OF_RIGHT_EYEBROW(5),
264       /**
265        *
266        *
267        * <pre>
268        * Right of right eyebrow.
269        * </pre>
270        *
271        * <code>RIGHT_OF_RIGHT_EYEBROW = 6;</code>
272        */
273       RIGHT_OF_RIGHT_EYEBROW(6),
274       /**
275        *
276        *
277        * <pre>
278        * Midpoint between eyes.
279        * </pre>
280        *
281        * <code>MIDPOINT_BETWEEN_EYES = 7;</code>
282        */
283       MIDPOINT_BETWEEN_EYES(7),
284       /**
285        *
286        *
287        * <pre>
288        * Nose tip.
289        * </pre>
290        *
291        * <code>NOSE_TIP = 8;</code>
292        */
293       NOSE_TIP(8),
294       /**
295        *
296        *
297        * <pre>
298        * Upper lip.
299        * </pre>
300        *
301        * <code>UPPER_LIP = 9;</code>
302        */
303       UPPER_LIP(9),
304       /**
305        *
306        *
307        * <pre>
308        * Lower lip.
309        * </pre>
310        *
311        * <code>LOWER_LIP = 10;</code>
312        */
313       LOWER_LIP(10),
314       /**
315        *
316        *
317        * <pre>
318        * Mouth left.
319        * </pre>
320        *
321        * <code>MOUTH_LEFT = 11;</code>
322        */
323       MOUTH_LEFT(11),
324       /**
325        *
326        *
327        * <pre>
328        * Mouth right.
329        * </pre>
330        *
331        * <code>MOUTH_RIGHT = 12;</code>
332        */
333       MOUTH_RIGHT(12),
334       /**
335        *
336        *
337        * <pre>
338        * Mouth center.
339        * </pre>
340        *
341        * <code>MOUTH_CENTER = 13;</code>
342        */
343       MOUTH_CENTER(13),
344       /**
345        *
346        *
347        * <pre>
348        * Nose, bottom right.
349        * </pre>
350        *
351        * <code>NOSE_BOTTOM_RIGHT = 14;</code>
352        */
353       NOSE_BOTTOM_RIGHT(14),
354       /**
355        *
356        *
357        * <pre>
358        * Nose, bottom left.
359        * </pre>
360        *
361        * <code>NOSE_BOTTOM_LEFT = 15;</code>
362        */
363       NOSE_BOTTOM_LEFT(15),
364       /**
365        *
366        *
367        * <pre>
368        * Nose, bottom center.
369        * </pre>
370        *
371        * <code>NOSE_BOTTOM_CENTER = 16;</code>
372        */
373       NOSE_BOTTOM_CENTER(16),
374       /**
375        *
376        *
377        * <pre>
378        * Left eye, top boundary.
379        * </pre>
380        *
381        * <code>LEFT_EYE_TOP_BOUNDARY = 17;</code>
382        */
383       LEFT_EYE_TOP_BOUNDARY(17),
384       /**
385        *
386        *
387        * <pre>
388        * Left eye, right corner.
389        * </pre>
390        *
391        * <code>LEFT_EYE_RIGHT_CORNER = 18;</code>
392        */
393       LEFT_EYE_RIGHT_CORNER(18),
394       /**
395        *
396        *
397        * <pre>
398        * Left eye, bottom boundary.
399        * </pre>
400        *
401        * <code>LEFT_EYE_BOTTOM_BOUNDARY = 19;</code>
402        */
403       LEFT_EYE_BOTTOM_BOUNDARY(19),
404       /**
405        *
406        *
407        * <pre>
408        * Left eye, left corner.
409        * </pre>
410        *
411        * <code>LEFT_EYE_LEFT_CORNER = 20;</code>
412        */
413       LEFT_EYE_LEFT_CORNER(20),
414       /**
415        *
416        *
417        * <pre>
418        * Right eye, top boundary.
419        * </pre>
420        *
421        * <code>RIGHT_EYE_TOP_BOUNDARY = 21;</code>
422        */
423       RIGHT_EYE_TOP_BOUNDARY(21),
424       /**
425        *
426        *
427        * <pre>
428        * Right eye, right corner.
429        * </pre>
430        *
431        * <code>RIGHT_EYE_RIGHT_CORNER = 22;</code>
432        */
433       RIGHT_EYE_RIGHT_CORNER(22),
434       /**
435        *
436        *
437        * <pre>
438        * Right eye, bottom boundary.
439        * </pre>
440        *
441        * <code>RIGHT_EYE_BOTTOM_BOUNDARY = 23;</code>
442        */
443       RIGHT_EYE_BOTTOM_BOUNDARY(23),
444       /**
445        *
446        *
447        * <pre>
448        * Right eye, left corner.
449        * </pre>
450        *
451        * <code>RIGHT_EYE_LEFT_CORNER = 24;</code>
452        */
453       RIGHT_EYE_LEFT_CORNER(24),
454       /**
455        *
456        *
457        * <pre>
458        * Left eyebrow, upper midpoint.
459        * </pre>
460        *
461        * <code>LEFT_EYEBROW_UPPER_MIDPOINT = 25;</code>
462        */
463       LEFT_EYEBROW_UPPER_MIDPOINT(25),
464       /**
465        *
466        *
467        * <pre>
468        * Right eyebrow, upper midpoint.
469        * </pre>
470        *
471        * <code>RIGHT_EYEBROW_UPPER_MIDPOINT = 26;</code>
472        */
473       RIGHT_EYEBROW_UPPER_MIDPOINT(26),
474       /**
475        *
476        *
477        * <pre>
478        * Left ear tragion.
479        * </pre>
480        *
481        * <code>LEFT_EAR_TRAGION = 27;</code>
482        */
483       LEFT_EAR_TRAGION(27),
484       /**
485        *
486        *
487        * <pre>
488        * Right ear tragion.
489        * </pre>
490        *
491        * <code>RIGHT_EAR_TRAGION = 28;</code>
492        */
493       RIGHT_EAR_TRAGION(28),
494       /**
495        *
496        *
497        * <pre>
498        * Left eye pupil.
499        * </pre>
500        *
501        * <code>LEFT_EYE_PUPIL = 29;</code>
502        */
503       LEFT_EYE_PUPIL(29),
504       /**
505        *
506        *
507        * <pre>
508        * Right eye pupil.
509        * </pre>
510        *
511        * <code>RIGHT_EYE_PUPIL = 30;</code>
512        */
513       RIGHT_EYE_PUPIL(30),
514       /**
515        *
516        *
517        * <pre>
518        * Forehead glabella.
519        * </pre>
520        *
521        * <code>FOREHEAD_GLABELLA = 31;</code>
522        */
523       FOREHEAD_GLABELLA(31),
524       /**
525        *
526        *
527        * <pre>
528        * Chin gnathion.
529        * </pre>
530        *
531        * <code>CHIN_GNATHION = 32;</code>
532        */
533       CHIN_GNATHION(32),
534       /**
535        *
536        *
537        * <pre>
538        * Chin left gonion.
539        * </pre>
540        *
541        * <code>CHIN_LEFT_GONION = 33;</code>
542        */
543       CHIN_LEFT_GONION(33),
544       /**
545        *
546        *
547        * <pre>
548        * Chin right gonion.
549        * </pre>
550        *
551        * <code>CHIN_RIGHT_GONION = 34;</code>
552        */
553       CHIN_RIGHT_GONION(34),
554       /**
555        *
556        *
557        * <pre>
558        * Left cheek center.
559        * </pre>
560        *
561        * <code>LEFT_CHEEK_CENTER = 35;</code>
562        */
563       LEFT_CHEEK_CENTER(35),
564       /**
565        *
566        *
567        * <pre>
568        * Right cheek center.
569        * </pre>
570        *
571        * <code>RIGHT_CHEEK_CENTER = 36;</code>
572        */
573       RIGHT_CHEEK_CENTER(36),
574       UNRECOGNIZED(-1),
575       ;
576 
577       /**
578        *
579        *
580        * <pre>
581        * Unknown face landmark detected. Should not be filled.
582        * </pre>
583        *
584        * <code>UNKNOWN_LANDMARK = 0;</code>
585        */
586       public static final int UNKNOWN_LANDMARK_VALUE = 0;
587       /**
588        *
589        *
590        * <pre>
591        * Left eye.
592        * </pre>
593        *
594        * <code>LEFT_EYE = 1;</code>
595        */
596       public static final int LEFT_EYE_VALUE = 1;
597       /**
598        *
599        *
600        * <pre>
601        * Right eye.
602        * </pre>
603        *
604        * <code>RIGHT_EYE = 2;</code>
605        */
606       public static final int RIGHT_EYE_VALUE = 2;
607       /**
608        *
609        *
610        * <pre>
611        * Left of left eyebrow.
612        * </pre>
613        *
614        * <code>LEFT_OF_LEFT_EYEBROW = 3;</code>
615        */
616       public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3;
617       /**
618        *
619        *
620        * <pre>
621        * Right of left eyebrow.
622        * </pre>
623        *
624        * <code>RIGHT_OF_LEFT_EYEBROW = 4;</code>
625        */
626       public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4;
627       /**
628        *
629        *
630        * <pre>
631        * Left of right eyebrow.
632        * </pre>
633        *
634        * <code>LEFT_OF_RIGHT_EYEBROW = 5;</code>
635        */
636       public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5;
637       /**
638        *
639        *
640        * <pre>
641        * Right of right eyebrow.
642        * </pre>
643        *
644        * <code>RIGHT_OF_RIGHT_EYEBROW = 6;</code>
645        */
646       public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6;
647       /**
648        *
649        *
650        * <pre>
651        * Midpoint between eyes.
652        * </pre>
653        *
654        * <code>MIDPOINT_BETWEEN_EYES = 7;</code>
655        */
656       public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7;
657       /**
658        *
659        *
660        * <pre>
661        * Nose tip.
662        * </pre>
663        *
664        * <code>NOSE_TIP = 8;</code>
665        */
666       public static final int NOSE_TIP_VALUE = 8;
667       /**
668        *
669        *
670        * <pre>
671        * Upper lip.
672        * </pre>
673        *
674        * <code>UPPER_LIP = 9;</code>
675        */
676       public static final int UPPER_LIP_VALUE = 9;
677       /**
678        *
679        *
680        * <pre>
681        * Lower lip.
682        * </pre>
683        *
684        * <code>LOWER_LIP = 10;</code>
685        */
686       public static final int LOWER_LIP_VALUE = 10;
687       /**
688        *
689        *
690        * <pre>
691        * Mouth left.
692        * </pre>
693        *
694        * <code>MOUTH_LEFT = 11;</code>
695        */
696       public static final int MOUTH_LEFT_VALUE = 11;
697       /**
698        *
699        *
700        * <pre>
701        * Mouth right.
702        * </pre>
703        *
704        * <code>MOUTH_RIGHT = 12;</code>
705        */
706       public static final int MOUTH_RIGHT_VALUE = 12;
707       /**
708        *
709        *
710        * <pre>
711        * Mouth center.
712        * </pre>
713        *
714        * <code>MOUTH_CENTER = 13;</code>
715        */
716       public static final int MOUTH_CENTER_VALUE = 13;
717       /**
718        *
719        *
720        * <pre>
721        * Nose, bottom right.
722        * </pre>
723        *
724        * <code>NOSE_BOTTOM_RIGHT = 14;</code>
725        */
726       public static final int NOSE_BOTTOM_RIGHT_VALUE = 14;
727       /**
728        *
729        *
730        * <pre>
731        * Nose, bottom left.
732        * </pre>
733        *
734        * <code>NOSE_BOTTOM_LEFT = 15;</code>
735        */
736       public static final int NOSE_BOTTOM_LEFT_VALUE = 15;
737       /**
738        *
739        *
740        * <pre>
741        * Nose, bottom center.
742        * </pre>
743        *
744        * <code>NOSE_BOTTOM_CENTER = 16;</code>
745        */
746       public static final int NOSE_BOTTOM_CENTER_VALUE = 16;
747       /**
748        *
749        *
750        * <pre>
751        * Left eye, top boundary.
752        * </pre>
753        *
754        * <code>LEFT_EYE_TOP_BOUNDARY = 17;</code>
755        */
756       public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17;
757       /**
758        *
759        *
760        * <pre>
761        * Left eye, right corner.
762        * </pre>
763        *
764        * <code>LEFT_EYE_RIGHT_CORNER = 18;</code>
765        */
766       public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18;
767       /**
768        *
769        *
770        * <pre>
771        * Left eye, bottom boundary.
772        * </pre>
773        *
774        * <code>LEFT_EYE_BOTTOM_BOUNDARY = 19;</code>
775        */
776       public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19;
777       /**
778        *
779        *
780        * <pre>
781        * Left eye, left corner.
782        * </pre>
783        *
784        * <code>LEFT_EYE_LEFT_CORNER = 20;</code>
785        */
786       public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20;
787       /**
788        *
789        *
790        * <pre>
791        * Right eye, top boundary.
792        * </pre>
793        *
794        * <code>RIGHT_EYE_TOP_BOUNDARY = 21;</code>
795        */
796       public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21;
797       /**
798        *
799        *
800        * <pre>
801        * Right eye, right corner.
802        * </pre>
803        *
804        * <code>RIGHT_EYE_RIGHT_CORNER = 22;</code>
805        */
806       public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22;
807       /**
808        *
809        *
810        * <pre>
811        * Right eye, bottom boundary.
812        * </pre>
813        *
814        * <code>RIGHT_EYE_BOTTOM_BOUNDARY = 23;</code>
815        */
816       public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23;
817       /**
818        *
819        *
820        * <pre>
821        * Right eye, left corner.
822        * </pre>
823        *
824        * <code>RIGHT_EYE_LEFT_CORNER = 24;</code>
825        */
826       public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24;
827       /**
828        *
829        *
830        * <pre>
831        * Left eyebrow, upper midpoint.
832        * </pre>
833        *
834        * <code>LEFT_EYEBROW_UPPER_MIDPOINT = 25;</code>
835        */
836       public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25;
837       /**
838        *
839        *
840        * <pre>
841        * Right eyebrow, upper midpoint.
842        * </pre>
843        *
844        * <code>RIGHT_EYEBROW_UPPER_MIDPOINT = 26;</code>
845        */
846       public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26;
847       /**
848        *
849        *
850        * <pre>
851        * Left ear tragion.
852        * </pre>
853        *
854        * <code>LEFT_EAR_TRAGION = 27;</code>
855        */
856       public static final int LEFT_EAR_TRAGION_VALUE = 27;
857       /**
858        *
859        *
860        * <pre>
861        * Right ear tragion.
862        * </pre>
863        *
864        * <code>RIGHT_EAR_TRAGION = 28;</code>
865        */
866       public static final int RIGHT_EAR_TRAGION_VALUE = 28;
867       /**
868        *
869        *
870        * <pre>
871        * Left eye pupil.
872        * </pre>
873        *
874        * <code>LEFT_EYE_PUPIL = 29;</code>
875        */
876       public static final int LEFT_EYE_PUPIL_VALUE = 29;
877       /**
878        *
879        *
880        * <pre>
881        * Right eye pupil.
882        * </pre>
883        *
884        * <code>RIGHT_EYE_PUPIL = 30;</code>
885        */
886       public static final int RIGHT_EYE_PUPIL_VALUE = 30;
887       /**
888        *
889        *
890        * <pre>
891        * Forehead glabella.
892        * </pre>
893        *
894        * <code>FOREHEAD_GLABELLA = 31;</code>
895        */
896       public static final int FOREHEAD_GLABELLA_VALUE = 31;
897       /**
898        *
899        *
900        * <pre>
901        * Chin gnathion.
902        * </pre>
903        *
904        * <code>CHIN_GNATHION = 32;</code>
905        */
906       public static final int CHIN_GNATHION_VALUE = 32;
907       /**
908        *
909        *
910        * <pre>
911        * Chin left gonion.
912        * </pre>
913        *
914        * <code>CHIN_LEFT_GONION = 33;</code>
915        */
916       public static final int CHIN_LEFT_GONION_VALUE = 33;
917       /**
918        *
919        *
920        * <pre>
921        * Chin right gonion.
922        * </pre>
923        *
924        * <code>CHIN_RIGHT_GONION = 34;</code>
925        */
926       public static final int CHIN_RIGHT_GONION_VALUE = 34;
927       /**
928        *
929        *
930        * <pre>
931        * Left cheek center.
932        * </pre>
933        *
934        * <code>LEFT_CHEEK_CENTER = 35;</code>
935        */
936       public static final int LEFT_CHEEK_CENTER_VALUE = 35;
937       /**
938        *
939        *
940        * <pre>
941        * Right cheek center.
942        * </pre>
943        *
944        * <code>RIGHT_CHEEK_CENTER = 36;</code>
945        */
946       public static final int RIGHT_CHEEK_CENTER_VALUE = 36;
947 
getNumber()948       public final int getNumber() {
949         if (this == UNRECOGNIZED) {
950           throw new java.lang.IllegalArgumentException(
951               "Can't get the number of an unknown enum value.");
952         }
953         return value;
954       }
955 
956       /**
957        * @param value The numeric wire value of the corresponding enum entry.
958        * @return The enum associated with the given numeric wire value.
959        * @deprecated Use {@link #forNumber(int)} instead.
960        */
961       @java.lang.Deprecated
valueOf(int value)962       public static Type valueOf(int value) {
963         return forNumber(value);
964       }
965 
966       /**
967        * @param value The numeric wire value of the corresponding enum entry.
968        * @return The enum associated with the given numeric wire value.
969        */
forNumber(int value)970       public static Type forNumber(int value) {
971         switch (value) {
972           case 0:
973             return UNKNOWN_LANDMARK;
974           case 1:
975             return LEFT_EYE;
976           case 2:
977             return RIGHT_EYE;
978           case 3:
979             return LEFT_OF_LEFT_EYEBROW;
980           case 4:
981             return RIGHT_OF_LEFT_EYEBROW;
982           case 5:
983             return LEFT_OF_RIGHT_EYEBROW;
984           case 6:
985             return RIGHT_OF_RIGHT_EYEBROW;
986           case 7:
987             return MIDPOINT_BETWEEN_EYES;
988           case 8:
989             return NOSE_TIP;
990           case 9:
991             return UPPER_LIP;
992           case 10:
993             return LOWER_LIP;
994           case 11:
995             return MOUTH_LEFT;
996           case 12:
997             return MOUTH_RIGHT;
998           case 13:
999             return MOUTH_CENTER;
1000           case 14:
1001             return NOSE_BOTTOM_RIGHT;
1002           case 15:
1003             return NOSE_BOTTOM_LEFT;
1004           case 16:
1005             return NOSE_BOTTOM_CENTER;
1006           case 17:
1007             return LEFT_EYE_TOP_BOUNDARY;
1008           case 18:
1009             return LEFT_EYE_RIGHT_CORNER;
1010           case 19:
1011             return LEFT_EYE_BOTTOM_BOUNDARY;
1012           case 20:
1013             return LEFT_EYE_LEFT_CORNER;
1014           case 21:
1015             return RIGHT_EYE_TOP_BOUNDARY;
1016           case 22:
1017             return RIGHT_EYE_RIGHT_CORNER;
1018           case 23:
1019             return RIGHT_EYE_BOTTOM_BOUNDARY;
1020           case 24:
1021             return RIGHT_EYE_LEFT_CORNER;
1022           case 25:
1023             return LEFT_EYEBROW_UPPER_MIDPOINT;
1024           case 26:
1025             return RIGHT_EYEBROW_UPPER_MIDPOINT;
1026           case 27:
1027             return LEFT_EAR_TRAGION;
1028           case 28:
1029             return RIGHT_EAR_TRAGION;
1030           case 29:
1031             return LEFT_EYE_PUPIL;
1032           case 30:
1033             return RIGHT_EYE_PUPIL;
1034           case 31:
1035             return FOREHEAD_GLABELLA;
1036           case 32:
1037             return CHIN_GNATHION;
1038           case 33:
1039             return CHIN_LEFT_GONION;
1040           case 34:
1041             return CHIN_RIGHT_GONION;
1042           case 35:
1043             return LEFT_CHEEK_CENTER;
1044           case 36:
1045             return RIGHT_CHEEK_CENTER;
1046           default:
1047             return null;
1048         }
1049       }
1050 
internalGetValueMap()1051       public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
1052         return internalValueMap;
1053       }
1054 
1055       private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
1056           new com.google.protobuf.Internal.EnumLiteMap<Type>() {
1057             public Type findValueByNumber(int number) {
1058               return Type.forNumber(number);
1059             }
1060           };
1061 
getValueDescriptor()1062       public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
1063         if (this == UNRECOGNIZED) {
1064           throw new java.lang.IllegalStateException(
1065               "Can't get the descriptor of an unrecognized enum value.");
1066         }
1067         return getDescriptor().getValues().get(ordinal());
1068       }
1069 
getDescriptorForType()1070       public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
1071         return getDescriptor();
1072       }
1073 
getDescriptor()1074       public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
1075         return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDescriptor()
1076             .getEnumTypes()
1077             .get(0);
1078       }
1079 
1080       private static final Type[] VALUES = values();
1081 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)1082       public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
1083         if (desc.getType() != getDescriptor()) {
1084           throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
1085         }
1086         if (desc.getIndex() == -1) {
1087           return UNRECOGNIZED;
1088         }
1089         return VALUES[desc.getIndex()];
1090       }
1091 
1092       private final int value;
1093 
Type(int value)1094       private Type(int value) {
1095         this.value = value;
1096       }
1097 
1098       // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1.FaceAnnotation.Landmark.Type)
1099     }
1100 
1101     public static final int TYPE_FIELD_NUMBER = 3;
1102     private int type_ = 0;
1103     /**
1104      *
1105      *
1106      * <pre>
1107      * Face landmark type.
1108      * </pre>
1109      *
1110      * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1111      *
1112      * @return The enum numeric value on the wire for type.
1113      */
1114     @java.lang.Override
getTypeValue()1115     public int getTypeValue() {
1116       return type_;
1117     }
1118     /**
1119      *
1120      *
1121      * <pre>
1122      * Face landmark type.
1123      * </pre>
1124      *
1125      * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1126      *
1127      * @return The type.
1128      */
1129     @java.lang.Override
getType()1130     public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() {
1131       com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result =
1132           com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.forNumber(type_);
1133       return result == null
1134           ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED
1135           : result;
1136     }
1137 
1138     public static final int POSITION_FIELD_NUMBER = 4;
1139     private com.google.cloud.vision.v1.Position position_;
1140     /**
1141      *
1142      *
1143      * <pre>
1144      * Face landmark position.
1145      * </pre>
1146      *
1147      * <code>.google.cloud.vision.v1.Position position = 4;</code>
1148      *
1149      * @return Whether the position field is set.
1150      */
1151     @java.lang.Override
hasPosition()1152     public boolean hasPosition() {
1153       return position_ != null;
1154     }
1155     /**
1156      *
1157      *
1158      * <pre>
1159      * Face landmark position.
1160      * </pre>
1161      *
1162      * <code>.google.cloud.vision.v1.Position position = 4;</code>
1163      *
1164      * @return The position.
1165      */
1166     @java.lang.Override
getPosition()1167     public com.google.cloud.vision.v1.Position getPosition() {
1168       return position_ == null
1169           ? com.google.cloud.vision.v1.Position.getDefaultInstance()
1170           : position_;
1171     }
1172     /**
1173      *
1174      *
1175      * <pre>
1176      * Face landmark position.
1177      * </pre>
1178      *
1179      * <code>.google.cloud.vision.v1.Position position = 4;</code>
1180      */
1181     @java.lang.Override
getPositionOrBuilder()1182     public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() {
1183       return position_ == null
1184           ? com.google.cloud.vision.v1.Position.getDefaultInstance()
1185           : position_;
1186     }
1187 
1188     private byte memoizedIsInitialized = -1;
1189 
1190     @java.lang.Override
isInitialized()1191     public final boolean isInitialized() {
1192       byte isInitialized = memoizedIsInitialized;
1193       if (isInitialized == 1) return true;
1194       if (isInitialized == 0) return false;
1195 
1196       memoizedIsInitialized = 1;
1197       return true;
1198     }
1199 
1200     @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1201     public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1202       if (type_
1203           != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) {
1204         output.writeEnum(3, type_);
1205       }
1206       if (position_ != null) {
1207         output.writeMessage(4, getPosition());
1208       }
1209       getUnknownFields().writeTo(output);
1210     }
1211 
1212     @java.lang.Override
getSerializedSize()1213     public int getSerializedSize() {
1214       int size = memoizedSize;
1215       if (size != -1) return size;
1216 
1217       size = 0;
1218       if (type_
1219           != com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK.getNumber()) {
1220         size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_);
1221       }
1222       if (position_ != null) {
1223         size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPosition());
1224       }
1225       size += getUnknownFields().getSerializedSize();
1226       memoizedSize = size;
1227       return size;
1228     }
1229 
1230     @java.lang.Override
equals(final java.lang.Object obj)1231     public boolean equals(final java.lang.Object obj) {
1232       if (obj == this) {
1233         return true;
1234       }
1235       if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark)) {
1236         return super.equals(obj);
1237       }
1238       com.google.cloud.vision.v1.FaceAnnotation.Landmark other =
1239           (com.google.cloud.vision.v1.FaceAnnotation.Landmark) obj;
1240 
1241       if (type_ != other.type_) return false;
1242       if (hasPosition() != other.hasPosition()) return false;
1243       if (hasPosition()) {
1244         if (!getPosition().equals(other.getPosition())) return false;
1245       }
1246       if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1247       return true;
1248     }
1249 
1250     @java.lang.Override
hashCode()1251     public int hashCode() {
1252       if (memoizedHashCode != 0) {
1253         return memoizedHashCode;
1254       }
1255       int hash = 41;
1256       hash = (19 * hash) + getDescriptor().hashCode();
1257       hash = (37 * hash) + TYPE_FIELD_NUMBER;
1258       hash = (53 * hash) + type_;
1259       if (hasPosition()) {
1260         hash = (37 * hash) + POSITION_FIELD_NUMBER;
1261         hash = (53 * hash) + getPosition().hashCode();
1262       }
1263       hash = (29 * hash) + getUnknownFields().hashCode();
1264       memoizedHashCode = hash;
1265       return hash;
1266     }
1267 
parseFrom( java.nio.ByteBuffer data)1268     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1269         java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
1270       return PARSER.parseFrom(data);
1271     }
1272 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1273     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1274         java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1275         throws com.google.protobuf.InvalidProtocolBufferException {
1276       return PARSER.parseFrom(data, extensionRegistry);
1277     }
1278 
parseFrom( com.google.protobuf.ByteString data)1279     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1280         com.google.protobuf.ByteString data)
1281         throws com.google.protobuf.InvalidProtocolBufferException {
1282       return PARSER.parseFrom(data);
1283     }
1284 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1285     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1286         com.google.protobuf.ByteString data,
1287         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1288         throws com.google.protobuf.InvalidProtocolBufferException {
1289       return PARSER.parseFrom(data, extensionRegistry);
1290     }
1291 
parseFrom(byte[] data)1292     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(byte[] data)
1293         throws com.google.protobuf.InvalidProtocolBufferException {
1294       return PARSER.parseFrom(data);
1295     }
1296 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1297     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1298         byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1299         throws com.google.protobuf.InvalidProtocolBufferException {
1300       return PARSER.parseFrom(data, extensionRegistry);
1301     }
1302 
parseFrom( java.io.InputStream input)1303     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1304         java.io.InputStream input) throws java.io.IOException {
1305       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1306     }
1307 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1308     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1309         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1310         throws java.io.IOException {
1311       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1312           PARSER, input, extensionRegistry);
1313     }
1314 
parseDelimitedFrom( java.io.InputStream input)1315     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom(
1316         java.io.InputStream input) throws java.io.IOException {
1317       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1318     }
1319 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1320     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseDelimitedFrom(
1321         java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1322         throws java.io.IOException {
1323       return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1324           PARSER, input, extensionRegistry);
1325     }
1326 
parseFrom( com.google.protobuf.CodedInputStream input)1327     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1328         com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1329       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1330     }
1331 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1332     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark parseFrom(
1333         com.google.protobuf.CodedInputStream input,
1334         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1335         throws java.io.IOException {
1336       return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1337           PARSER, input, extensionRegistry);
1338     }
1339 
1340     @java.lang.Override
newBuilderForType()1341     public Builder newBuilderForType() {
1342       return newBuilder();
1343     }
1344 
newBuilder()1345     public static Builder newBuilder() {
1346       return DEFAULT_INSTANCE.toBuilder();
1347     }
1348 
newBuilder(com.google.cloud.vision.v1.FaceAnnotation.Landmark prototype)1349     public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation.Landmark prototype) {
1350       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1351     }
1352 
1353     @java.lang.Override
toBuilder()1354     public Builder toBuilder() {
1355       return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1356     }
1357 
1358     @java.lang.Override
newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1359     protected Builder newBuilderForType(
1360         com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1361       Builder builder = new Builder(parent);
1362       return builder;
1363     }
1364     /**
1365      *
1366      *
1367      * <pre>
1368      * A face-specific landmark (for example, a face feature).
1369      * </pre>
1370      *
1371      * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation.Landmark}
1372      */
1373     public static final class Builder
1374         extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1375         implements
1376         // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation.Landmark)
1377         com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder {
getDescriptor()1378       public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1379         return com.google.cloud.vision.v1.ImageAnnotatorProto
1380             .internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor;
1381       }
1382 
1383       @java.lang.Override
1384       protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1385           internalGetFieldAccessorTable() {
1386         return com.google.cloud.vision.v1.ImageAnnotatorProto
1387             .internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_fieldAccessorTable
1388             .ensureFieldAccessorsInitialized(
1389                 com.google.cloud.vision.v1.FaceAnnotation.Landmark.class,
1390                 com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder.class);
1391       }
1392 
1393       // Construct using com.google.cloud.vision.v1.FaceAnnotation.Landmark.newBuilder()
Builder()1394       private Builder() {}
1395 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1396       private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1397         super(parent);
1398       }
1399 
1400       @java.lang.Override
clear()1401       public Builder clear() {
1402         super.clear();
1403         bitField0_ = 0;
1404         type_ = 0;
1405         position_ = null;
1406         if (positionBuilder_ != null) {
1407           positionBuilder_.dispose();
1408           positionBuilder_ = null;
1409         }
1410         return this;
1411       }
1412 
1413       @java.lang.Override
getDescriptorForType()1414       public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1415         return com.google.cloud.vision.v1.ImageAnnotatorProto
1416             .internal_static_google_cloud_vision_v1_FaceAnnotation_Landmark_descriptor;
1417       }
1418 
1419       @java.lang.Override
getDefaultInstanceForType()1420       public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() {
1421         return com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance();
1422       }
1423 
1424       @java.lang.Override
build()1425       public com.google.cloud.vision.v1.FaceAnnotation.Landmark build() {
1426         com.google.cloud.vision.v1.FaceAnnotation.Landmark result = buildPartial();
1427         if (!result.isInitialized()) {
1428           throw newUninitializedMessageException(result);
1429         }
1430         return result;
1431       }
1432 
1433       @java.lang.Override
buildPartial()1434       public com.google.cloud.vision.v1.FaceAnnotation.Landmark buildPartial() {
1435         com.google.cloud.vision.v1.FaceAnnotation.Landmark result =
1436             new com.google.cloud.vision.v1.FaceAnnotation.Landmark(this);
1437         if (bitField0_ != 0) {
1438           buildPartial0(result);
1439         }
1440         onBuilt();
1441         return result;
1442       }
1443 
buildPartial0(com.google.cloud.vision.v1.FaceAnnotation.Landmark result)1444       private void buildPartial0(com.google.cloud.vision.v1.FaceAnnotation.Landmark result) {
1445         int from_bitField0_ = bitField0_;
1446         if (((from_bitField0_ & 0x00000001) != 0)) {
1447           result.type_ = type_;
1448         }
1449         if (((from_bitField0_ & 0x00000002) != 0)) {
1450           result.position_ = positionBuilder_ == null ? position_ : positionBuilder_.build();
1451         }
1452       }
1453 
1454       @java.lang.Override
clone()1455       public Builder clone() {
1456         return super.clone();
1457       }
1458 
1459       @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1460       public Builder setField(
1461           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1462         return super.setField(field, value);
1463       }
1464 
1465       @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1466       public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1467         return super.clearField(field);
1468       }
1469 
1470       @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1471       public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1472         return super.clearOneof(oneof);
1473       }
1474 
1475       @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1476       public Builder setRepeatedField(
1477           com.google.protobuf.Descriptors.FieldDescriptor field,
1478           int index,
1479           java.lang.Object value) {
1480         return super.setRepeatedField(field, index, value);
1481       }
1482 
1483       @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1484       public Builder addRepeatedField(
1485           com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1486         return super.addRepeatedField(field, value);
1487       }
1488 
1489       @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1490       public Builder mergeFrom(com.google.protobuf.Message other) {
1491         if (other instanceof com.google.cloud.vision.v1.FaceAnnotation.Landmark) {
1492           return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation.Landmark) other);
1493         } else {
1494           super.mergeFrom(other);
1495           return this;
1496         }
1497       }
1498 
mergeFrom(com.google.cloud.vision.v1.FaceAnnotation.Landmark other)1499       public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation.Landmark other) {
1500         if (other == com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance())
1501           return this;
1502         if (other.type_ != 0) {
1503           setTypeValue(other.getTypeValue());
1504         }
1505         if (other.hasPosition()) {
1506           mergePosition(other.getPosition());
1507         }
1508         this.mergeUnknownFields(other.getUnknownFields());
1509         onChanged();
1510         return this;
1511       }
1512 
1513       @java.lang.Override
isInitialized()1514       public final boolean isInitialized() {
1515         return true;
1516       }
1517 
1518       @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1519       public Builder mergeFrom(
1520           com.google.protobuf.CodedInputStream input,
1521           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1522           throws java.io.IOException {
1523         if (extensionRegistry == null) {
1524           throw new java.lang.NullPointerException();
1525         }
1526         try {
1527           boolean done = false;
1528           while (!done) {
1529             int tag = input.readTag();
1530             switch (tag) {
1531               case 0:
1532                 done = true;
1533                 break;
1534               case 24:
1535                 {
1536                   type_ = input.readEnum();
1537                   bitField0_ |= 0x00000001;
1538                   break;
1539                 } // case 24
1540               case 34:
1541                 {
1542                   input.readMessage(getPositionFieldBuilder().getBuilder(), extensionRegistry);
1543                   bitField0_ |= 0x00000002;
1544                   break;
1545                 } // case 34
1546               default:
1547                 {
1548                   if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1549                     done = true; // was an endgroup tag
1550                   }
1551                   break;
1552                 } // default:
1553             } // switch (tag)
1554           } // while (!done)
1555         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1556           throw e.unwrapIOException();
1557         } finally {
1558           onChanged();
1559         } // finally
1560         return this;
1561       }
1562 
1563       private int bitField0_;
1564 
1565       private int type_ = 0;
1566       /**
1567        *
1568        *
1569        * <pre>
1570        * Face landmark type.
1571        * </pre>
1572        *
1573        * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1574        *
1575        * @return The enum numeric value on the wire for type.
1576        */
1577       @java.lang.Override
getTypeValue()1578       public int getTypeValue() {
1579         return type_;
1580       }
1581       /**
1582        *
1583        *
1584        * <pre>
1585        * Face landmark type.
1586        * </pre>
1587        *
1588        * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1589        *
1590        * @param value The enum numeric value on the wire for type to set.
1591        * @return This builder for chaining.
1592        */
setTypeValue(int value)1593       public Builder setTypeValue(int value) {
1594         type_ = value;
1595         bitField0_ |= 0x00000001;
1596         onChanged();
1597         return this;
1598       }
1599       /**
1600        *
1601        *
1602        * <pre>
1603        * Face landmark type.
1604        * </pre>
1605        *
1606        * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1607        *
1608        * @return The type.
1609        */
1610       @java.lang.Override
getType()1611       public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type getType() {
1612         com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type result =
1613             com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.forNumber(type_);
1614         return result == null
1615             ? com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type.UNRECOGNIZED
1616             : result;
1617       }
1618       /**
1619        *
1620        *
1621        * <pre>
1622        * Face landmark type.
1623        * </pre>
1624        *
1625        * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1626        *
1627        * @param value The type to set.
1628        * @return This builder for chaining.
1629        */
setType(com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type value)1630       public Builder setType(com.google.cloud.vision.v1.FaceAnnotation.Landmark.Type value) {
1631         if (value == null) {
1632           throw new NullPointerException();
1633         }
1634         bitField0_ |= 0x00000001;
1635         type_ = value.getNumber();
1636         onChanged();
1637         return this;
1638       }
1639       /**
1640        *
1641        *
1642        * <pre>
1643        * Face landmark type.
1644        * </pre>
1645        *
1646        * <code>.google.cloud.vision.v1.FaceAnnotation.Landmark.Type type = 3;</code>
1647        *
1648        * @return This builder for chaining.
1649        */
clearType()1650       public Builder clearType() {
1651         bitField0_ = (bitField0_ & ~0x00000001);
1652         type_ = 0;
1653         onChanged();
1654         return this;
1655       }
1656 
1657       private com.google.cloud.vision.v1.Position position_;
1658       private com.google.protobuf.SingleFieldBuilderV3<
1659               com.google.cloud.vision.v1.Position,
1660               com.google.cloud.vision.v1.Position.Builder,
1661               com.google.cloud.vision.v1.PositionOrBuilder>
1662           positionBuilder_;
1663       /**
1664        *
1665        *
1666        * <pre>
1667        * Face landmark position.
1668        * </pre>
1669        *
1670        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1671        *
1672        * @return Whether the position field is set.
1673        */
hasPosition()1674       public boolean hasPosition() {
1675         return ((bitField0_ & 0x00000002) != 0);
1676       }
1677       /**
1678        *
1679        *
1680        * <pre>
1681        * Face landmark position.
1682        * </pre>
1683        *
1684        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1685        *
1686        * @return The position.
1687        */
getPosition()1688       public com.google.cloud.vision.v1.Position getPosition() {
1689         if (positionBuilder_ == null) {
1690           return position_ == null
1691               ? com.google.cloud.vision.v1.Position.getDefaultInstance()
1692               : position_;
1693         } else {
1694           return positionBuilder_.getMessage();
1695         }
1696       }
1697       /**
1698        *
1699        *
1700        * <pre>
1701        * Face landmark position.
1702        * </pre>
1703        *
1704        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1705        */
setPosition(com.google.cloud.vision.v1.Position value)1706       public Builder setPosition(com.google.cloud.vision.v1.Position value) {
1707         if (positionBuilder_ == null) {
1708           if (value == null) {
1709             throw new NullPointerException();
1710           }
1711           position_ = value;
1712         } else {
1713           positionBuilder_.setMessage(value);
1714         }
1715         bitField0_ |= 0x00000002;
1716         onChanged();
1717         return this;
1718       }
1719       /**
1720        *
1721        *
1722        * <pre>
1723        * Face landmark position.
1724        * </pre>
1725        *
1726        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1727        */
setPosition(com.google.cloud.vision.v1.Position.Builder builderForValue)1728       public Builder setPosition(com.google.cloud.vision.v1.Position.Builder builderForValue) {
1729         if (positionBuilder_ == null) {
1730           position_ = builderForValue.build();
1731         } else {
1732           positionBuilder_.setMessage(builderForValue.build());
1733         }
1734         bitField0_ |= 0x00000002;
1735         onChanged();
1736         return this;
1737       }
1738       /**
1739        *
1740        *
1741        * <pre>
1742        * Face landmark position.
1743        * </pre>
1744        *
1745        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1746        */
mergePosition(com.google.cloud.vision.v1.Position value)1747       public Builder mergePosition(com.google.cloud.vision.v1.Position value) {
1748         if (positionBuilder_ == null) {
1749           if (((bitField0_ & 0x00000002) != 0)
1750               && position_ != null
1751               && position_ != com.google.cloud.vision.v1.Position.getDefaultInstance()) {
1752             getPositionBuilder().mergeFrom(value);
1753           } else {
1754             position_ = value;
1755           }
1756         } else {
1757           positionBuilder_.mergeFrom(value);
1758         }
1759         bitField0_ |= 0x00000002;
1760         onChanged();
1761         return this;
1762       }
1763       /**
1764        *
1765        *
1766        * <pre>
1767        * Face landmark position.
1768        * </pre>
1769        *
1770        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1771        */
clearPosition()1772       public Builder clearPosition() {
1773         bitField0_ = (bitField0_ & ~0x00000002);
1774         position_ = null;
1775         if (positionBuilder_ != null) {
1776           positionBuilder_.dispose();
1777           positionBuilder_ = null;
1778         }
1779         onChanged();
1780         return this;
1781       }
1782       /**
1783        *
1784        *
1785        * <pre>
1786        * Face landmark position.
1787        * </pre>
1788        *
1789        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1790        */
getPositionBuilder()1791       public com.google.cloud.vision.v1.Position.Builder getPositionBuilder() {
1792         bitField0_ |= 0x00000002;
1793         onChanged();
1794         return getPositionFieldBuilder().getBuilder();
1795       }
1796       /**
1797        *
1798        *
1799        * <pre>
1800        * Face landmark position.
1801        * </pre>
1802        *
1803        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1804        */
getPositionOrBuilder()1805       public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() {
1806         if (positionBuilder_ != null) {
1807           return positionBuilder_.getMessageOrBuilder();
1808         } else {
1809           return position_ == null
1810               ? com.google.cloud.vision.v1.Position.getDefaultInstance()
1811               : position_;
1812         }
1813       }
1814       /**
1815        *
1816        *
1817        * <pre>
1818        * Face landmark position.
1819        * </pre>
1820        *
1821        * <code>.google.cloud.vision.v1.Position position = 4;</code>
1822        */
1823       private com.google.protobuf.SingleFieldBuilderV3<
1824               com.google.cloud.vision.v1.Position,
1825               com.google.cloud.vision.v1.Position.Builder,
1826               com.google.cloud.vision.v1.PositionOrBuilder>
getPositionFieldBuilder()1827           getPositionFieldBuilder() {
1828         if (positionBuilder_ == null) {
1829           positionBuilder_ =
1830               new com.google.protobuf.SingleFieldBuilderV3<
1831                   com.google.cloud.vision.v1.Position,
1832                   com.google.cloud.vision.v1.Position.Builder,
1833                   com.google.cloud.vision.v1.PositionOrBuilder>(
1834                   getPosition(), getParentForChildren(), isClean());
1835           position_ = null;
1836         }
1837         return positionBuilder_;
1838       }
1839 
1840       @java.lang.Override
setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1841       public final Builder setUnknownFields(
1842           final com.google.protobuf.UnknownFieldSet unknownFields) {
1843         return super.setUnknownFields(unknownFields);
1844       }
1845 
1846       @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1847       public final Builder mergeUnknownFields(
1848           final com.google.protobuf.UnknownFieldSet unknownFields) {
1849         return super.mergeUnknownFields(unknownFields);
1850       }
1851 
1852       // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation.Landmark)
1853     }
1854 
1855     // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation.Landmark)
1856     private static final com.google.cloud.vision.v1.FaceAnnotation.Landmark DEFAULT_INSTANCE;
1857 
1858     static {
1859       DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation.Landmark();
1860     }
1861 
getDefaultInstance()1862     public static com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstance() {
1863       return DEFAULT_INSTANCE;
1864     }
1865 
1866     private static final com.google.protobuf.Parser<Landmark> PARSER =
1867         new com.google.protobuf.AbstractParser<Landmark>() {
1868           @java.lang.Override
1869           public Landmark parsePartialFrom(
1870               com.google.protobuf.CodedInputStream input,
1871               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1872               throws com.google.protobuf.InvalidProtocolBufferException {
1873             Builder builder = newBuilder();
1874             try {
1875               builder.mergeFrom(input, extensionRegistry);
1876             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1877               throw e.setUnfinishedMessage(builder.buildPartial());
1878             } catch (com.google.protobuf.UninitializedMessageException e) {
1879               throw e.asInvalidProtocolBufferException()
1880                   .setUnfinishedMessage(builder.buildPartial());
1881             } catch (java.io.IOException e) {
1882               throw new com.google.protobuf.InvalidProtocolBufferException(e)
1883                   .setUnfinishedMessage(builder.buildPartial());
1884             }
1885             return builder.buildPartial();
1886           }
1887         };
1888 
parser()1889     public static com.google.protobuf.Parser<Landmark> parser() {
1890       return PARSER;
1891     }
1892 
1893     @java.lang.Override
getParserForType()1894     public com.google.protobuf.Parser<Landmark> getParserForType() {
1895       return PARSER;
1896     }
1897 
1898     @java.lang.Override
getDefaultInstanceForType()1899     public com.google.cloud.vision.v1.FaceAnnotation.Landmark getDefaultInstanceForType() {
1900       return DEFAULT_INSTANCE;
1901     }
1902   }
1903 
1904   public static final int BOUNDING_POLY_FIELD_NUMBER = 1;
1905   private com.google.cloud.vision.v1.BoundingPoly boundingPoly_;
1906   /**
1907    *
1908    *
1909    * <pre>
1910    * The bounding polygon around the face. The coordinates of the bounding box
1911    * are in the original image's scale.
1912    * The bounding box is computed to "frame" the face in accordance with human
1913    * expectations. It is based on the landmarker results.
1914    * Note that one or more x and/or y coordinates may not be generated in the
1915    * `BoundingPoly` (the polygon will be unbounded) if only a partial face
1916    * appears in the image to be annotated.
1917    * </pre>
1918    *
1919    * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
1920    *
1921    * @return Whether the boundingPoly field is set.
1922    */
1923   @java.lang.Override
hasBoundingPoly()1924   public boolean hasBoundingPoly() {
1925     return boundingPoly_ != null;
1926   }
1927   /**
1928    *
1929    *
1930    * <pre>
1931    * The bounding polygon around the face. The coordinates of the bounding box
1932    * are in the original image's scale.
1933    * The bounding box is computed to "frame" the face in accordance with human
1934    * expectations. It is based on the landmarker results.
1935    * Note that one or more x and/or y coordinates may not be generated in the
1936    * `BoundingPoly` (the polygon will be unbounded) if only a partial face
1937    * appears in the image to be annotated.
1938    * </pre>
1939    *
1940    * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
1941    *
1942    * @return The boundingPoly.
1943    */
1944   @java.lang.Override
getBoundingPoly()1945   public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() {
1946     return boundingPoly_ == null
1947         ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
1948         : boundingPoly_;
1949   }
1950   /**
1951    *
1952    *
1953    * <pre>
1954    * The bounding polygon around the face. The coordinates of the bounding box
1955    * are in the original image's scale.
1956    * The bounding box is computed to "frame" the face in accordance with human
1957    * expectations. It is based on the landmarker results.
1958    * Note that one or more x and/or y coordinates may not be generated in the
1959    * `BoundingPoly` (the polygon will be unbounded) if only a partial face
1960    * appears in the image to be annotated.
1961    * </pre>
1962    *
1963    * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
1964    */
1965   @java.lang.Override
getBoundingPolyOrBuilder()1966   public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() {
1967     return boundingPoly_ == null
1968         ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
1969         : boundingPoly_;
1970   }
1971 
1972   public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2;
1973   private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_;
1974   /**
1975    *
1976    *
1977    * <pre>
1978    * The `fd_bounding_poly` bounding polygon is tighter than the
1979    * `boundingPoly`, and encloses only the skin part of the face. Typically, it
1980    * is used to eliminate the face from any image analysis that detects the
1981    * "amount of skin" visible in an image. It is not based on the
1982    * landmarker results, only on the initial face detection, hence
1983    * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
1984    * </pre>
1985    *
1986    * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
1987    *
1988    * @return Whether the fdBoundingPoly field is set.
1989    */
1990   @java.lang.Override
hasFdBoundingPoly()1991   public boolean hasFdBoundingPoly() {
1992     return fdBoundingPoly_ != null;
1993   }
1994   /**
1995    *
1996    *
1997    * <pre>
1998    * The `fd_bounding_poly` bounding polygon is tighter than the
1999    * `boundingPoly`, and encloses only the skin part of the face. Typically, it
2000    * is used to eliminate the face from any image analysis that detects the
2001    * "amount of skin" visible in an image. It is not based on the
2002    * landmarker results, only on the initial face detection, hence
2003    * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
2004    * </pre>
2005    *
2006    * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
2007    *
2008    * @return The fdBoundingPoly.
2009    */
2010   @java.lang.Override
getFdBoundingPoly()2011   public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() {
2012     return fdBoundingPoly_ == null
2013         ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
2014         : fdBoundingPoly_;
2015   }
2016   /**
2017    *
2018    *
2019    * <pre>
2020    * The `fd_bounding_poly` bounding polygon is tighter than the
2021    * `boundingPoly`, and encloses only the skin part of the face. Typically, it
2022    * is used to eliminate the face from any image analysis that detects the
2023    * "amount of skin" visible in an image. It is not based on the
2024    * landmarker results, only on the initial face detection, hence
2025    * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
2026    * </pre>
2027    *
2028    * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
2029    */
2030   @java.lang.Override
getFdBoundingPolyOrBuilder()2031   public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() {
2032     return fdBoundingPoly_ == null
2033         ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
2034         : fdBoundingPoly_;
2035   }
2036 
2037   public static final int LANDMARKS_FIELD_NUMBER = 3;
2038 
2039   @SuppressWarnings("serial")
2040   private java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Landmark> landmarks_;
2041   /**
2042    *
2043    *
2044    * <pre>
2045    * Detected face landmarks.
2046    * </pre>
2047    *
2048    * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
2049    */
2050   @java.lang.Override
getLandmarksList()2051   public java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Landmark> getLandmarksList() {
2052     return landmarks_;
2053   }
2054   /**
2055    *
2056    *
2057    * <pre>
2058    * Detected face landmarks.
2059    * </pre>
2060    *
2061    * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
2062    */
2063   @java.lang.Override
2064   public java.util.List<? extends com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>
getLandmarksOrBuilderList()2065       getLandmarksOrBuilderList() {
2066     return landmarks_;
2067   }
2068   /**
2069    *
2070    *
2071    * <pre>
2072    * Detected face landmarks.
2073    * </pre>
2074    *
2075    * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
2076    */
2077   @java.lang.Override
getLandmarksCount()2078   public int getLandmarksCount() {
2079     return landmarks_.size();
2080   }
2081   /**
2082    *
2083    *
2084    * <pre>
2085    * Detected face landmarks.
2086    * </pre>
2087    *
2088    * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
2089    */
2090   @java.lang.Override
getLandmarks(int index)2091   public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) {
2092     return landmarks_.get(index);
2093   }
2094   /**
2095    *
2096    *
2097    * <pre>
2098    * Detected face landmarks.
2099    * </pre>
2100    *
2101    * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
2102    */
2103   @java.lang.Override
getLandmarksOrBuilder( int index)2104   public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(
2105       int index) {
2106     return landmarks_.get(index);
2107   }
2108 
2109   public static final int ROLL_ANGLE_FIELD_NUMBER = 4;
2110   private float rollAngle_ = 0F;
2111   /**
2112    *
2113    *
2114    * <pre>
2115    * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
2116    * of the face relative to the image vertical about the axis perpendicular to
2117    * the face. Range [-180,180].
2118    * </pre>
2119    *
2120    * <code>float roll_angle = 4;</code>
2121    *
2122    * @return The rollAngle.
2123    */
2124   @java.lang.Override
getRollAngle()2125   public float getRollAngle() {
2126     return rollAngle_;
2127   }
2128 
2129   public static final int PAN_ANGLE_FIELD_NUMBER = 5;
2130   private float panAngle_ = 0F;
2131   /**
2132    *
2133    *
2134    * <pre>
2135    * Yaw angle, which indicates the leftward/rightward angle that the face is
2136    * pointing relative to the vertical plane perpendicular to the image. Range
2137    * [-180,180].
2138    * </pre>
2139    *
2140    * <code>float pan_angle = 5;</code>
2141    *
2142    * @return The panAngle.
2143    */
2144   @java.lang.Override
getPanAngle()2145   public float getPanAngle() {
2146     return panAngle_;
2147   }
2148 
2149   public static final int TILT_ANGLE_FIELD_NUMBER = 6;
2150   private float tiltAngle_ = 0F;
2151   /**
2152    *
2153    *
2154    * <pre>
2155    * Pitch angle, which indicates the upwards/downwards angle that the face is
2156    * pointing relative to the image's horizontal plane. Range [-180,180].
2157    * </pre>
2158    *
2159    * <code>float tilt_angle = 6;</code>
2160    *
2161    * @return The tiltAngle.
2162    */
2163   @java.lang.Override
getTiltAngle()2164   public float getTiltAngle() {
2165     return tiltAngle_;
2166   }
2167 
2168   public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7;
2169   private float detectionConfidence_ = 0F;
2170   /**
2171    *
2172    *
2173    * <pre>
2174    * Detection confidence. Range [0, 1].
2175    * </pre>
2176    *
2177    * <code>float detection_confidence = 7;</code>
2178    *
2179    * @return The detectionConfidence.
2180    */
2181   @java.lang.Override
getDetectionConfidence()2182   public float getDetectionConfidence() {
2183     return detectionConfidence_;
2184   }
2185 
2186   public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8;
2187   private float landmarkingConfidence_ = 0F;
2188   /**
2189    *
2190    *
2191    * <pre>
2192    * Face landmarking confidence. Range [0, 1].
2193    * </pre>
2194    *
2195    * <code>float landmarking_confidence = 8;</code>
2196    *
2197    * @return The landmarkingConfidence.
2198    */
2199   @java.lang.Override
getLandmarkingConfidence()2200   public float getLandmarkingConfidence() {
2201     return landmarkingConfidence_;
2202   }
2203 
2204   public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9;
2205   private int joyLikelihood_ = 0;
2206   /**
2207    *
2208    *
2209    * <pre>
2210    * Joy likelihood.
2211    * </pre>
2212    *
2213    * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
2214    *
2215    * @return The enum numeric value on the wire for joyLikelihood.
2216    */
2217   @java.lang.Override
getJoyLikelihoodValue()2218   public int getJoyLikelihoodValue() {
2219     return joyLikelihood_;
2220   }
2221   /**
2222    *
2223    *
2224    * <pre>
2225    * Joy likelihood.
2226    * </pre>
2227    *
2228    * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
2229    *
2230    * @return The joyLikelihood.
2231    */
2232   @java.lang.Override
getJoyLikelihood()2233   public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() {
2234     com.google.cloud.vision.v1.Likelihood result =
2235         com.google.cloud.vision.v1.Likelihood.forNumber(joyLikelihood_);
2236     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2237   }
2238 
2239   public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10;
2240   private int sorrowLikelihood_ = 0;
2241   /**
2242    *
2243    *
2244    * <pre>
2245    * Sorrow likelihood.
2246    * </pre>
2247    *
2248    * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
2249    *
2250    * @return The enum numeric value on the wire for sorrowLikelihood.
2251    */
2252   @java.lang.Override
getSorrowLikelihoodValue()2253   public int getSorrowLikelihoodValue() {
2254     return sorrowLikelihood_;
2255   }
2256   /**
2257    *
2258    *
2259    * <pre>
2260    * Sorrow likelihood.
2261    * </pre>
2262    *
2263    * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
2264    *
2265    * @return The sorrowLikelihood.
2266    */
2267   @java.lang.Override
getSorrowLikelihood()2268   public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() {
2269     com.google.cloud.vision.v1.Likelihood result =
2270         com.google.cloud.vision.v1.Likelihood.forNumber(sorrowLikelihood_);
2271     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2272   }
2273 
2274   public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11;
2275   private int angerLikelihood_ = 0;
2276   /**
2277    *
2278    *
2279    * <pre>
2280    * Anger likelihood.
2281    * </pre>
2282    *
2283    * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
2284    *
2285    * @return The enum numeric value on the wire for angerLikelihood.
2286    */
2287   @java.lang.Override
getAngerLikelihoodValue()2288   public int getAngerLikelihoodValue() {
2289     return angerLikelihood_;
2290   }
2291   /**
2292    *
2293    *
2294    * <pre>
2295    * Anger likelihood.
2296    * </pre>
2297    *
2298    * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
2299    *
2300    * @return The angerLikelihood.
2301    */
2302   @java.lang.Override
getAngerLikelihood()2303   public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() {
2304     com.google.cloud.vision.v1.Likelihood result =
2305         com.google.cloud.vision.v1.Likelihood.forNumber(angerLikelihood_);
2306     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2307   }
2308 
2309   public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12;
2310   private int surpriseLikelihood_ = 0;
2311   /**
2312    *
2313    *
2314    * <pre>
2315    * Surprise likelihood.
2316    * </pre>
2317    *
2318    * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
2319    *
2320    * @return The enum numeric value on the wire for surpriseLikelihood.
2321    */
2322   @java.lang.Override
getSurpriseLikelihoodValue()2323   public int getSurpriseLikelihoodValue() {
2324     return surpriseLikelihood_;
2325   }
2326   /**
2327    *
2328    *
2329    * <pre>
2330    * Surprise likelihood.
2331    * </pre>
2332    *
2333    * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
2334    *
2335    * @return The surpriseLikelihood.
2336    */
2337   @java.lang.Override
getSurpriseLikelihood()2338   public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() {
2339     com.google.cloud.vision.v1.Likelihood result =
2340         com.google.cloud.vision.v1.Likelihood.forNumber(surpriseLikelihood_);
2341     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2342   }
2343 
2344   public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13;
2345   private int underExposedLikelihood_ = 0;
2346   /**
2347    *
2348    *
2349    * <pre>
2350    * Under-exposed likelihood.
2351    * </pre>
2352    *
2353    * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
2354    *
2355    * @return The enum numeric value on the wire for underExposedLikelihood.
2356    */
2357   @java.lang.Override
getUnderExposedLikelihoodValue()2358   public int getUnderExposedLikelihoodValue() {
2359     return underExposedLikelihood_;
2360   }
2361   /**
2362    *
2363    *
2364    * <pre>
2365    * Under-exposed likelihood.
2366    * </pre>
2367    *
2368    * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
2369    *
2370    * @return The underExposedLikelihood.
2371    */
2372   @java.lang.Override
getUnderExposedLikelihood()2373   public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() {
2374     com.google.cloud.vision.v1.Likelihood result =
2375         com.google.cloud.vision.v1.Likelihood.forNumber(underExposedLikelihood_);
2376     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2377   }
2378 
2379   public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14;
2380   private int blurredLikelihood_ = 0;
2381   /**
2382    *
2383    *
2384    * <pre>
2385    * Blurred likelihood.
2386    * </pre>
2387    *
2388    * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
2389    *
2390    * @return The enum numeric value on the wire for blurredLikelihood.
2391    */
2392   @java.lang.Override
getBlurredLikelihoodValue()2393   public int getBlurredLikelihoodValue() {
2394     return blurredLikelihood_;
2395   }
2396   /**
2397    *
2398    *
2399    * <pre>
2400    * Blurred likelihood.
2401    * </pre>
2402    *
2403    * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
2404    *
2405    * @return The blurredLikelihood.
2406    */
2407   @java.lang.Override
getBlurredLikelihood()2408   public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() {
2409     com.google.cloud.vision.v1.Likelihood result =
2410         com.google.cloud.vision.v1.Likelihood.forNumber(blurredLikelihood_);
2411     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2412   }
2413 
2414   public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15;
2415   private int headwearLikelihood_ = 0;
2416   /**
2417    *
2418    *
2419    * <pre>
2420    * Headwear likelihood.
2421    * </pre>
2422    *
2423    * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
2424    *
2425    * @return The enum numeric value on the wire for headwearLikelihood.
2426    */
2427   @java.lang.Override
getHeadwearLikelihoodValue()2428   public int getHeadwearLikelihoodValue() {
2429     return headwearLikelihood_;
2430   }
2431   /**
2432    *
2433    *
2434    * <pre>
2435    * Headwear likelihood.
2436    * </pre>
2437    *
2438    * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
2439    *
2440    * @return The headwearLikelihood.
2441    */
2442   @java.lang.Override
getHeadwearLikelihood()2443   public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() {
2444     com.google.cloud.vision.v1.Likelihood result =
2445         com.google.cloud.vision.v1.Likelihood.forNumber(headwearLikelihood_);
2446     return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
2447   }
2448 
2449   private byte memoizedIsInitialized = -1;
2450 
2451   @java.lang.Override
isInitialized()2452   public final boolean isInitialized() {
2453     byte isInitialized = memoizedIsInitialized;
2454     if (isInitialized == 1) return true;
2455     if (isInitialized == 0) return false;
2456 
2457     memoizedIsInitialized = 1;
2458     return true;
2459   }
2460 
2461   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)2462   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
2463     if (boundingPoly_ != null) {
2464       output.writeMessage(1, getBoundingPoly());
2465     }
2466     if (fdBoundingPoly_ != null) {
2467       output.writeMessage(2, getFdBoundingPoly());
2468     }
2469     for (int i = 0; i < landmarks_.size(); i++) {
2470       output.writeMessage(3, landmarks_.get(i));
2471     }
2472     if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) {
2473       output.writeFloat(4, rollAngle_);
2474     }
2475     if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) {
2476       output.writeFloat(5, panAngle_);
2477     }
2478     if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) {
2479       output.writeFloat(6, tiltAngle_);
2480     }
2481     if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) {
2482       output.writeFloat(7, detectionConfidence_);
2483     }
2484     if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) {
2485       output.writeFloat(8, landmarkingConfidence_);
2486     }
2487     if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2488       output.writeEnum(9, joyLikelihood_);
2489     }
2490     if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2491       output.writeEnum(10, sorrowLikelihood_);
2492     }
2493     if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2494       output.writeEnum(11, angerLikelihood_);
2495     }
2496     if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2497       output.writeEnum(12, surpriseLikelihood_);
2498     }
2499     if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2500       output.writeEnum(13, underExposedLikelihood_);
2501     }
2502     if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2503       output.writeEnum(14, blurredLikelihood_);
2504     }
2505     if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2506       output.writeEnum(15, headwearLikelihood_);
2507     }
2508     getUnknownFields().writeTo(output);
2509   }
2510 
2511   @java.lang.Override
getSerializedSize()2512   public int getSerializedSize() {
2513     int size = memoizedSize;
2514     if (size != -1) return size;
2515 
2516     size = 0;
2517     if (boundingPoly_ != null) {
2518       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBoundingPoly());
2519     }
2520     if (fdBoundingPoly_ != null) {
2521       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFdBoundingPoly());
2522     }
2523     for (int i = 0; i < landmarks_.size(); i++) {
2524       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, landmarks_.get(i));
2525     }
2526     if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) {
2527       size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, rollAngle_);
2528     }
2529     if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) {
2530       size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, panAngle_);
2531     }
2532     if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) {
2533       size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, tiltAngle_);
2534     }
2535     if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) {
2536       size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, detectionConfidence_);
2537     }
2538     if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) {
2539       size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, landmarkingConfidence_);
2540     }
2541     if (joyLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2542       size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, joyLikelihood_);
2543     }
2544     if (sorrowLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2545       size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, sorrowLikelihood_);
2546     }
2547     if (angerLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2548       size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, angerLikelihood_);
2549     }
2550     if (surpriseLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2551       size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, surpriseLikelihood_);
2552     }
2553     if (underExposedLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2554       size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, underExposedLikelihood_);
2555     }
2556     if (blurredLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2557       size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, blurredLikelihood_);
2558     }
2559     if (headwearLikelihood_ != com.google.cloud.vision.v1.Likelihood.UNKNOWN.getNumber()) {
2560       size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, headwearLikelihood_);
2561     }
2562     size += getUnknownFields().getSerializedSize();
2563     memoizedSize = size;
2564     return size;
2565   }
2566 
2567   @java.lang.Override
equals(final java.lang.Object obj)2568   public boolean equals(final java.lang.Object obj) {
2569     if (obj == this) {
2570       return true;
2571     }
2572     if (!(obj instanceof com.google.cloud.vision.v1.FaceAnnotation)) {
2573       return super.equals(obj);
2574     }
2575     com.google.cloud.vision.v1.FaceAnnotation other =
2576         (com.google.cloud.vision.v1.FaceAnnotation) obj;
2577 
2578     if (hasBoundingPoly() != other.hasBoundingPoly()) return false;
2579     if (hasBoundingPoly()) {
2580       if (!getBoundingPoly().equals(other.getBoundingPoly())) return false;
2581     }
2582     if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false;
2583     if (hasFdBoundingPoly()) {
2584       if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false;
2585     }
2586     if (!getLandmarksList().equals(other.getLandmarksList())) return false;
2587     if (java.lang.Float.floatToIntBits(getRollAngle())
2588         != java.lang.Float.floatToIntBits(other.getRollAngle())) return false;
2589     if (java.lang.Float.floatToIntBits(getPanAngle())
2590         != java.lang.Float.floatToIntBits(other.getPanAngle())) return false;
2591     if (java.lang.Float.floatToIntBits(getTiltAngle())
2592         != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false;
2593     if (java.lang.Float.floatToIntBits(getDetectionConfidence())
2594         != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false;
2595     if (java.lang.Float.floatToIntBits(getLandmarkingConfidence())
2596         != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false;
2597     if (joyLikelihood_ != other.joyLikelihood_) return false;
2598     if (sorrowLikelihood_ != other.sorrowLikelihood_) return false;
2599     if (angerLikelihood_ != other.angerLikelihood_) return false;
2600     if (surpriseLikelihood_ != other.surpriseLikelihood_) return false;
2601     if (underExposedLikelihood_ != other.underExposedLikelihood_) return false;
2602     if (blurredLikelihood_ != other.blurredLikelihood_) return false;
2603     if (headwearLikelihood_ != other.headwearLikelihood_) return false;
2604     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
2605     return true;
2606   }
2607 
2608   @java.lang.Override
hashCode()2609   public int hashCode() {
2610     if (memoizedHashCode != 0) {
2611       return memoizedHashCode;
2612     }
2613     int hash = 41;
2614     hash = (19 * hash) + getDescriptor().hashCode();
2615     if (hasBoundingPoly()) {
2616       hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER;
2617       hash = (53 * hash) + getBoundingPoly().hashCode();
2618     }
2619     if (hasFdBoundingPoly()) {
2620       hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER;
2621       hash = (53 * hash) + getFdBoundingPoly().hashCode();
2622     }
2623     if (getLandmarksCount() > 0) {
2624       hash = (37 * hash) + LANDMARKS_FIELD_NUMBER;
2625       hash = (53 * hash) + getLandmarksList().hashCode();
2626     }
2627     hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER;
2628     hash = (53 * hash) + java.lang.Float.floatToIntBits(getRollAngle());
2629     hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER;
2630     hash = (53 * hash) + java.lang.Float.floatToIntBits(getPanAngle());
2631     hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER;
2632     hash = (53 * hash) + java.lang.Float.floatToIntBits(getTiltAngle());
2633     hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER;
2634     hash = (53 * hash) + java.lang.Float.floatToIntBits(getDetectionConfidence());
2635     hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER;
2636     hash = (53 * hash) + java.lang.Float.floatToIntBits(getLandmarkingConfidence());
2637     hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER;
2638     hash = (53 * hash) + joyLikelihood_;
2639     hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER;
2640     hash = (53 * hash) + sorrowLikelihood_;
2641     hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER;
2642     hash = (53 * hash) + angerLikelihood_;
2643     hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER;
2644     hash = (53 * hash) + surpriseLikelihood_;
2645     hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER;
2646     hash = (53 * hash) + underExposedLikelihood_;
2647     hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER;
2648     hash = (53 * hash) + blurredLikelihood_;
2649     hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER;
2650     hash = (53 * hash) + headwearLikelihood_;
2651     hash = (29 * hash) + getUnknownFields().hashCode();
2652     memoizedHashCode = hash;
2653     return hash;
2654   }
2655 
parseFrom(java.nio.ByteBuffer data)2656   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(java.nio.ByteBuffer data)
2657       throws com.google.protobuf.InvalidProtocolBufferException {
2658     return PARSER.parseFrom(data);
2659   }
2660 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2661   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2662       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2663       throws com.google.protobuf.InvalidProtocolBufferException {
2664     return PARSER.parseFrom(data, extensionRegistry);
2665   }
2666 
parseFrom( com.google.protobuf.ByteString data)2667   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2668       com.google.protobuf.ByteString data)
2669       throws com.google.protobuf.InvalidProtocolBufferException {
2670     return PARSER.parseFrom(data);
2671   }
2672 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2673   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2674       com.google.protobuf.ByteString data,
2675       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2676       throws com.google.protobuf.InvalidProtocolBufferException {
2677     return PARSER.parseFrom(data, extensionRegistry);
2678   }
2679 
parseFrom(byte[] data)2680   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(byte[] data)
2681       throws com.google.protobuf.InvalidProtocolBufferException {
2682     return PARSER.parseFrom(data);
2683   }
2684 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2685   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2686       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2687       throws com.google.protobuf.InvalidProtocolBufferException {
2688     return PARSER.parseFrom(data, extensionRegistry);
2689   }
2690 
parseFrom(java.io.InputStream input)2691   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(java.io.InputStream input)
2692       throws java.io.IOException {
2693     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2694   }
2695 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2696   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2697       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2698       throws java.io.IOException {
2699     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2700         PARSER, input, extensionRegistry);
2701   }
2702 
parseDelimitedFrom( java.io.InputStream input)2703   public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom(
2704       java.io.InputStream input) throws java.io.IOException {
2705     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2706   }
2707 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2708   public static com.google.cloud.vision.v1.FaceAnnotation parseDelimitedFrom(
2709       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2710       throws java.io.IOException {
2711     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2712         PARSER, input, extensionRegistry);
2713   }
2714 
parseFrom( com.google.protobuf.CodedInputStream input)2715   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2716       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2717     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2718   }
2719 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2720   public static com.google.cloud.vision.v1.FaceAnnotation parseFrom(
2721       com.google.protobuf.CodedInputStream input,
2722       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2723       throws java.io.IOException {
2724     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2725         PARSER, input, extensionRegistry);
2726   }
2727 
2728   @java.lang.Override
newBuilderForType()2729   public Builder newBuilderForType() {
2730     return newBuilder();
2731   }
2732 
newBuilder()2733   public static Builder newBuilder() {
2734     return DEFAULT_INSTANCE.toBuilder();
2735   }
2736 
newBuilder(com.google.cloud.vision.v1.FaceAnnotation prototype)2737   public static Builder newBuilder(com.google.cloud.vision.v1.FaceAnnotation prototype) {
2738     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2739   }
2740 
2741   @java.lang.Override
toBuilder()2742   public Builder toBuilder() {
2743     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2744   }
2745 
2746   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2747   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2748     Builder builder = new Builder(parent);
2749     return builder;
2750   }
2751   /**
2752    *
2753    *
2754    * <pre>
2755    * A face annotation object contains the results of face detection.
2756    * </pre>
2757    *
2758    * Protobuf type {@code google.cloud.vision.v1.FaceAnnotation}
2759    */
2760   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2761       implements
2762       // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.FaceAnnotation)
2763       com.google.cloud.vision.v1.FaceAnnotationOrBuilder {
getDescriptor()2764     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2765       return com.google.cloud.vision.v1.ImageAnnotatorProto
2766           .internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor;
2767     }
2768 
2769     @java.lang.Override
2770     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2771         internalGetFieldAccessorTable() {
2772       return com.google.cloud.vision.v1.ImageAnnotatorProto
2773           .internal_static_google_cloud_vision_v1_FaceAnnotation_fieldAccessorTable
2774           .ensureFieldAccessorsInitialized(
2775               com.google.cloud.vision.v1.FaceAnnotation.class,
2776               com.google.cloud.vision.v1.FaceAnnotation.Builder.class);
2777     }
2778 
2779     // Construct using com.google.cloud.vision.v1.FaceAnnotation.newBuilder()
Builder()2780     private Builder() {}
2781 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2782     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2783       super(parent);
2784     }
2785 
2786     @java.lang.Override
clear()2787     public Builder clear() {
2788       super.clear();
2789       bitField0_ = 0;
2790       boundingPoly_ = null;
2791       if (boundingPolyBuilder_ != null) {
2792         boundingPolyBuilder_.dispose();
2793         boundingPolyBuilder_ = null;
2794       }
2795       fdBoundingPoly_ = null;
2796       if (fdBoundingPolyBuilder_ != null) {
2797         fdBoundingPolyBuilder_.dispose();
2798         fdBoundingPolyBuilder_ = null;
2799       }
2800       if (landmarksBuilder_ == null) {
2801         landmarks_ = java.util.Collections.emptyList();
2802       } else {
2803         landmarks_ = null;
2804         landmarksBuilder_.clear();
2805       }
2806       bitField0_ = (bitField0_ & ~0x00000004);
2807       rollAngle_ = 0F;
2808       panAngle_ = 0F;
2809       tiltAngle_ = 0F;
2810       detectionConfidence_ = 0F;
2811       landmarkingConfidence_ = 0F;
2812       joyLikelihood_ = 0;
2813       sorrowLikelihood_ = 0;
2814       angerLikelihood_ = 0;
2815       surpriseLikelihood_ = 0;
2816       underExposedLikelihood_ = 0;
2817       blurredLikelihood_ = 0;
2818       headwearLikelihood_ = 0;
2819       return this;
2820     }
2821 
2822     @java.lang.Override
getDescriptorForType()2823     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2824       return com.google.cloud.vision.v1.ImageAnnotatorProto
2825           .internal_static_google_cloud_vision_v1_FaceAnnotation_descriptor;
2826     }
2827 
2828     @java.lang.Override
getDefaultInstanceForType()2829     public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() {
2830       return com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance();
2831     }
2832 
2833     @java.lang.Override
build()2834     public com.google.cloud.vision.v1.FaceAnnotation build() {
2835       com.google.cloud.vision.v1.FaceAnnotation result = buildPartial();
2836       if (!result.isInitialized()) {
2837         throw newUninitializedMessageException(result);
2838       }
2839       return result;
2840     }
2841 
2842     @java.lang.Override
buildPartial()2843     public com.google.cloud.vision.v1.FaceAnnotation buildPartial() {
2844       com.google.cloud.vision.v1.FaceAnnotation result =
2845           new com.google.cloud.vision.v1.FaceAnnotation(this);
2846       buildPartialRepeatedFields(result);
2847       if (bitField0_ != 0) {
2848         buildPartial0(result);
2849       }
2850       onBuilt();
2851       return result;
2852     }
2853 
buildPartialRepeatedFields(com.google.cloud.vision.v1.FaceAnnotation result)2854     private void buildPartialRepeatedFields(com.google.cloud.vision.v1.FaceAnnotation result) {
2855       if (landmarksBuilder_ == null) {
2856         if (((bitField0_ & 0x00000004) != 0)) {
2857           landmarks_ = java.util.Collections.unmodifiableList(landmarks_);
2858           bitField0_ = (bitField0_ & ~0x00000004);
2859         }
2860         result.landmarks_ = landmarks_;
2861       } else {
2862         result.landmarks_ = landmarksBuilder_.build();
2863       }
2864     }
2865 
buildPartial0(com.google.cloud.vision.v1.FaceAnnotation result)2866     private void buildPartial0(com.google.cloud.vision.v1.FaceAnnotation result) {
2867       int from_bitField0_ = bitField0_;
2868       if (((from_bitField0_ & 0x00000001) != 0)) {
2869         result.boundingPoly_ =
2870             boundingPolyBuilder_ == null ? boundingPoly_ : boundingPolyBuilder_.build();
2871       }
2872       if (((from_bitField0_ & 0x00000002) != 0)) {
2873         result.fdBoundingPoly_ =
2874             fdBoundingPolyBuilder_ == null ? fdBoundingPoly_ : fdBoundingPolyBuilder_.build();
2875       }
2876       if (((from_bitField0_ & 0x00000008) != 0)) {
2877         result.rollAngle_ = rollAngle_;
2878       }
2879       if (((from_bitField0_ & 0x00000010) != 0)) {
2880         result.panAngle_ = panAngle_;
2881       }
2882       if (((from_bitField0_ & 0x00000020) != 0)) {
2883         result.tiltAngle_ = tiltAngle_;
2884       }
2885       if (((from_bitField0_ & 0x00000040) != 0)) {
2886         result.detectionConfidence_ = detectionConfidence_;
2887       }
2888       if (((from_bitField0_ & 0x00000080) != 0)) {
2889         result.landmarkingConfidence_ = landmarkingConfidence_;
2890       }
2891       if (((from_bitField0_ & 0x00000100) != 0)) {
2892         result.joyLikelihood_ = joyLikelihood_;
2893       }
2894       if (((from_bitField0_ & 0x00000200) != 0)) {
2895         result.sorrowLikelihood_ = sorrowLikelihood_;
2896       }
2897       if (((from_bitField0_ & 0x00000400) != 0)) {
2898         result.angerLikelihood_ = angerLikelihood_;
2899       }
2900       if (((from_bitField0_ & 0x00000800) != 0)) {
2901         result.surpriseLikelihood_ = surpriseLikelihood_;
2902       }
2903       if (((from_bitField0_ & 0x00001000) != 0)) {
2904         result.underExposedLikelihood_ = underExposedLikelihood_;
2905       }
2906       if (((from_bitField0_ & 0x00002000) != 0)) {
2907         result.blurredLikelihood_ = blurredLikelihood_;
2908       }
2909       if (((from_bitField0_ & 0x00004000) != 0)) {
2910         result.headwearLikelihood_ = headwearLikelihood_;
2911       }
2912     }
2913 
2914     @java.lang.Override
clone()2915     public Builder clone() {
2916       return super.clone();
2917     }
2918 
2919     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2920     public Builder setField(
2921         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2922       return super.setField(field, value);
2923     }
2924 
2925     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2926     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2927       return super.clearField(field);
2928     }
2929 
2930     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2931     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2932       return super.clearOneof(oneof);
2933     }
2934 
2935     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2936     public Builder setRepeatedField(
2937         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2938       return super.setRepeatedField(field, index, value);
2939     }
2940 
2941     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2942     public Builder addRepeatedField(
2943         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2944       return super.addRepeatedField(field, value);
2945     }
2946 
2947     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2948     public Builder mergeFrom(com.google.protobuf.Message other) {
2949       if (other instanceof com.google.cloud.vision.v1.FaceAnnotation) {
2950         return mergeFrom((com.google.cloud.vision.v1.FaceAnnotation) other);
2951       } else {
2952         super.mergeFrom(other);
2953         return this;
2954       }
2955     }
2956 
mergeFrom(com.google.cloud.vision.v1.FaceAnnotation other)2957     public Builder mergeFrom(com.google.cloud.vision.v1.FaceAnnotation other) {
2958       if (other == com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance()) return this;
2959       if (other.hasBoundingPoly()) {
2960         mergeBoundingPoly(other.getBoundingPoly());
2961       }
2962       if (other.hasFdBoundingPoly()) {
2963         mergeFdBoundingPoly(other.getFdBoundingPoly());
2964       }
2965       if (landmarksBuilder_ == null) {
2966         if (!other.landmarks_.isEmpty()) {
2967           if (landmarks_.isEmpty()) {
2968             landmarks_ = other.landmarks_;
2969             bitField0_ = (bitField0_ & ~0x00000004);
2970           } else {
2971             ensureLandmarksIsMutable();
2972             landmarks_.addAll(other.landmarks_);
2973           }
2974           onChanged();
2975         }
2976       } else {
2977         if (!other.landmarks_.isEmpty()) {
2978           if (landmarksBuilder_.isEmpty()) {
2979             landmarksBuilder_.dispose();
2980             landmarksBuilder_ = null;
2981             landmarks_ = other.landmarks_;
2982             bitField0_ = (bitField0_ & ~0x00000004);
2983             landmarksBuilder_ =
2984                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2985                     ? getLandmarksFieldBuilder()
2986                     : null;
2987           } else {
2988             landmarksBuilder_.addAllMessages(other.landmarks_);
2989           }
2990         }
2991       }
2992       if (other.getRollAngle() != 0F) {
2993         setRollAngle(other.getRollAngle());
2994       }
2995       if (other.getPanAngle() != 0F) {
2996         setPanAngle(other.getPanAngle());
2997       }
2998       if (other.getTiltAngle() != 0F) {
2999         setTiltAngle(other.getTiltAngle());
3000       }
3001       if (other.getDetectionConfidence() != 0F) {
3002         setDetectionConfidence(other.getDetectionConfidence());
3003       }
3004       if (other.getLandmarkingConfidence() != 0F) {
3005         setLandmarkingConfidence(other.getLandmarkingConfidence());
3006       }
3007       if (other.joyLikelihood_ != 0) {
3008         setJoyLikelihoodValue(other.getJoyLikelihoodValue());
3009       }
3010       if (other.sorrowLikelihood_ != 0) {
3011         setSorrowLikelihoodValue(other.getSorrowLikelihoodValue());
3012       }
3013       if (other.angerLikelihood_ != 0) {
3014         setAngerLikelihoodValue(other.getAngerLikelihoodValue());
3015       }
3016       if (other.surpriseLikelihood_ != 0) {
3017         setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue());
3018       }
3019       if (other.underExposedLikelihood_ != 0) {
3020         setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue());
3021       }
3022       if (other.blurredLikelihood_ != 0) {
3023         setBlurredLikelihoodValue(other.getBlurredLikelihoodValue());
3024       }
3025       if (other.headwearLikelihood_ != 0) {
3026         setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue());
3027       }
3028       this.mergeUnknownFields(other.getUnknownFields());
3029       onChanged();
3030       return this;
3031     }
3032 
3033     @java.lang.Override
isInitialized()3034     public final boolean isInitialized() {
3035       return true;
3036     }
3037 
3038     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)3039     public Builder mergeFrom(
3040         com.google.protobuf.CodedInputStream input,
3041         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3042         throws java.io.IOException {
3043       if (extensionRegistry == null) {
3044         throw new java.lang.NullPointerException();
3045       }
3046       try {
3047         boolean done = false;
3048         while (!done) {
3049           int tag = input.readTag();
3050           switch (tag) {
3051             case 0:
3052               done = true;
3053               break;
3054             case 10:
3055               {
3056                 input.readMessage(getBoundingPolyFieldBuilder().getBuilder(), extensionRegistry);
3057                 bitField0_ |= 0x00000001;
3058                 break;
3059               } // case 10
3060             case 18:
3061               {
3062                 input.readMessage(getFdBoundingPolyFieldBuilder().getBuilder(), extensionRegistry);
3063                 bitField0_ |= 0x00000002;
3064                 break;
3065               } // case 18
3066             case 26:
3067               {
3068                 com.google.cloud.vision.v1.FaceAnnotation.Landmark m =
3069                     input.readMessage(
3070                         com.google.cloud.vision.v1.FaceAnnotation.Landmark.parser(),
3071                         extensionRegistry);
3072                 if (landmarksBuilder_ == null) {
3073                   ensureLandmarksIsMutable();
3074                   landmarks_.add(m);
3075                 } else {
3076                   landmarksBuilder_.addMessage(m);
3077                 }
3078                 break;
3079               } // case 26
3080             case 37:
3081               {
3082                 rollAngle_ = input.readFloat();
3083                 bitField0_ |= 0x00000008;
3084                 break;
3085               } // case 37
3086             case 45:
3087               {
3088                 panAngle_ = input.readFloat();
3089                 bitField0_ |= 0x00000010;
3090                 break;
3091               } // case 45
3092             case 53:
3093               {
3094                 tiltAngle_ = input.readFloat();
3095                 bitField0_ |= 0x00000020;
3096                 break;
3097               } // case 53
3098             case 61:
3099               {
3100                 detectionConfidence_ = input.readFloat();
3101                 bitField0_ |= 0x00000040;
3102                 break;
3103               } // case 61
3104             case 69:
3105               {
3106                 landmarkingConfidence_ = input.readFloat();
3107                 bitField0_ |= 0x00000080;
3108                 break;
3109               } // case 69
3110             case 72:
3111               {
3112                 joyLikelihood_ = input.readEnum();
3113                 bitField0_ |= 0x00000100;
3114                 break;
3115               } // case 72
3116             case 80:
3117               {
3118                 sorrowLikelihood_ = input.readEnum();
3119                 bitField0_ |= 0x00000200;
3120                 break;
3121               } // case 80
3122             case 88:
3123               {
3124                 angerLikelihood_ = input.readEnum();
3125                 bitField0_ |= 0x00000400;
3126                 break;
3127               } // case 88
3128             case 96:
3129               {
3130                 surpriseLikelihood_ = input.readEnum();
3131                 bitField0_ |= 0x00000800;
3132                 break;
3133               } // case 96
3134             case 104:
3135               {
3136                 underExposedLikelihood_ = input.readEnum();
3137                 bitField0_ |= 0x00001000;
3138                 break;
3139               } // case 104
3140             case 112:
3141               {
3142                 blurredLikelihood_ = input.readEnum();
3143                 bitField0_ |= 0x00002000;
3144                 break;
3145               } // case 112
3146             case 120:
3147               {
3148                 headwearLikelihood_ = input.readEnum();
3149                 bitField0_ |= 0x00004000;
3150                 break;
3151               } // case 120
3152             default:
3153               {
3154                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
3155                   done = true; // was an endgroup tag
3156                 }
3157                 break;
3158               } // default:
3159           } // switch (tag)
3160         } // while (!done)
3161       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3162         throw e.unwrapIOException();
3163       } finally {
3164         onChanged();
3165       } // finally
3166       return this;
3167     }
3168 
3169     private int bitField0_;
3170 
3171     private com.google.cloud.vision.v1.BoundingPoly boundingPoly_;
3172     private com.google.protobuf.SingleFieldBuilderV3<
3173             com.google.cloud.vision.v1.BoundingPoly,
3174             com.google.cloud.vision.v1.BoundingPoly.Builder,
3175             com.google.cloud.vision.v1.BoundingPolyOrBuilder>
3176         boundingPolyBuilder_;
3177     /**
3178      *
3179      *
3180      * <pre>
3181      * The bounding polygon around the face. The coordinates of the bounding box
3182      * are in the original image's scale.
3183      * The bounding box is computed to "frame" the face in accordance with human
3184      * expectations. It is based on the landmarker results.
3185      * Note that one or more x and/or y coordinates may not be generated in the
3186      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3187      * appears in the image to be annotated.
3188      * </pre>
3189      *
3190      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3191      *
3192      * @return Whether the boundingPoly field is set.
3193      */
hasBoundingPoly()3194     public boolean hasBoundingPoly() {
3195       return ((bitField0_ & 0x00000001) != 0);
3196     }
3197     /**
3198      *
3199      *
3200      * <pre>
3201      * The bounding polygon around the face. The coordinates of the bounding box
3202      * are in the original image's scale.
3203      * The bounding box is computed to "frame" the face in accordance with human
3204      * expectations. It is based on the landmarker results.
3205      * Note that one or more x and/or y coordinates may not be generated in the
3206      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3207      * appears in the image to be annotated.
3208      * </pre>
3209      *
3210      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3211      *
3212      * @return The boundingPoly.
3213      */
getBoundingPoly()3214     public com.google.cloud.vision.v1.BoundingPoly getBoundingPoly() {
3215       if (boundingPolyBuilder_ == null) {
3216         return boundingPoly_ == null
3217             ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
3218             : boundingPoly_;
3219       } else {
3220         return boundingPolyBuilder_.getMessage();
3221       }
3222     }
3223     /**
3224      *
3225      *
3226      * <pre>
3227      * The bounding polygon around the face. The coordinates of the bounding box
3228      * are in the original image's scale.
3229      * The bounding box is computed to "frame" the face in accordance with human
3230      * expectations. It is based on the landmarker results.
3231      * Note that one or more x and/or y coordinates may not be generated in the
3232      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3233      * appears in the image to be annotated.
3234      * </pre>
3235      *
3236      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3237      */
setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value)3238     public Builder setBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) {
3239       if (boundingPolyBuilder_ == null) {
3240         if (value == null) {
3241           throw new NullPointerException();
3242         }
3243         boundingPoly_ = value;
3244       } else {
3245         boundingPolyBuilder_.setMessage(value);
3246       }
3247       bitField0_ |= 0x00000001;
3248       onChanged();
3249       return this;
3250     }
3251     /**
3252      *
3253      *
3254      * <pre>
3255      * The bounding polygon around the face. The coordinates of the bounding box
3256      * are in the original image's scale.
3257      * The bounding box is computed to "frame" the face in accordance with human
3258      * expectations. It is based on the landmarker results.
3259      * Note that one or more x and/or y coordinates may not be generated in the
3260      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3261      * appears in the image to be annotated.
3262      * </pre>
3263      *
3264      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3265      */
setBoundingPoly( com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue)3266     public Builder setBoundingPoly(
3267         com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) {
3268       if (boundingPolyBuilder_ == null) {
3269         boundingPoly_ = builderForValue.build();
3270       } else {
3271         boundingPolyBuilder_.setMessage(builderForValue.build());
3272       }
3273       bitField0_ |= 0x00000001;
3274       onChanged();
3275       return this;
3276     }
3277     /**
3278      *
3279      *
3280      * <pre>
3281      * The bounding polygon around the face. The coordinates of the bounding box
3282      * are in the original image's scale.
3283      * The bounding box is computed to "frame" the face in accordance with human
3284      * expectations. It is based on the landmarker results.
3285      * Note that one or more x and/or y coordinates may not be generated in the
3286      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3287      * appears in the image to be annotated.
3288      * </pre>
3289      *
3290      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3291      */
mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value)3292     public Builder mergeBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) {
3293       if (boundingPolyBuilder_ == null) {
3294         if (((bitField0_ & 0x00000001) != 0)
3295             && boundingPoly_ != null
3296             && boundingPoly_ != com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()) {
3297           getBoundingPolyBuilder().mergeFrom(value);
3298         } else {
3299           boundingPoly_ = value;
3300         }
3301       } else {
3302         boundingPolyBuilder_.mergeFrom(value);
3303       }
3304       bitField0_ |= 0x00000001;
3305       onChanged();
3306       return this;
3307     }
3308     /**
3309      *
3310      *
3311      * <pre>
3312      * The bounding polygon around the face. The coordinates of the bounding box
3313      * are in the original image's scale.
3314      * The bounding box is computed to "frame" the face in accordance with human
3315      * expectations. It is based on the landmarker results.
3316      * Note that one or more x and/or y coordinates may not be generated in the
3317      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3318      * appears in the image to be annotated.
3319      * </pre>
3320      *
3321      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3322      */
clearBoundingPoly()3323     public Builder clearBoundingPoly() {
3324       bitField0_ = (bitField0_ & ~0x00000001);
3325       boundingPoly_ = null;
3326       if (boundingPolyBuilder_ != null) {
3327         boundingPolyBuilder_.dispose();
3328         boundingPolyBuilder_ = null;
3329       }
3330       onChanged();
3331       return this;
3332     }
3333     /**
3334      *
3335      *
3336      * <pre>
3337      * The bounding polygon around the face. The coordinates of the bounding box
3338      * are in the original image's scale.
3339      * The bounding box is computed to "frame" the face in accordance with human
3340      * expectations. It is based on the landmarker results.
3341      * Note that one or more x and/or y coordinates may not be generated in the
3342      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3343      * appears in the image to be annotated.
3344      * </pre>
3345      *
3346      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3347      */
getBoundingPolyBuilder()3348     public com.google.cloud.vision.v1.BoundingPoly.Builder getBoundingPolyBuilder() {
3349       bitField0_ |= 0x00000001;
3350       onChanged();
3351       return getBoundingPolyFieldBuilder().getBuilder();
3352     }
3353     /**
3354      *
3355      *
3356      * <pre>
3357      * The bounding polygon around the face. The coordinates of the bounding box
3358      * are in the original image's scale.
3359      * The bounding box is computed to "frame" the face in accordance with human
3360      * expectations. It is based on the landmarker results.
3361      * Note that one or more x and/or y coordinates may not be generated in the
3362      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3363      * appears in the image to be annotated.
3364      * </pre>
3365      *
3366      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3367      */
getBoundingPolyOrBuilder()3368     public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() {
3369       if (boundingPolyBuilder_ != null) {
3370         return boundingPolyBuilder_.getMessageOrBuilder();
3371       } else {
3372         return boundingPoly_ == null
3373             ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
3374             : boundingPoly_;
3375       }
3376     }
3377     /**
3378      *
3379      *
3380      * <pre>
3381      * The bounding polygon around the face. The coordinates of the bounding box
3382      * are in the original image's scale.
3383      * The bounding box is computed to "frame" the face in accordance with human
3384      * expectations. It is based on the landmarker results.
3385      * Note that one or more x and/or y coordinates may not be generated in the
3386      * `BoundingPoly` (the polygon will be unbounded) if only a partial face
3387      * appears in the image to be annotated.
3388      * </pre>
3389      *
3390      * <code>.google.cloud.vision.v1.BoundingPoly bounding_poly = 1;</code>
3391      */
3392     private com.google.protobuf.SingleFieldBuilderV3<
3393             com.google.cloud.vision.v1.BoundingPoly,
3394             com.google.cloud.vision.v1.BoundingPoly.Builder,
3395             com.google.cloud.vision.v1.BoundingPolyOrBuilder>
getBoundingPolyFieldBuilder()3396         getBoundingPolyFieldBuilder() {
3397       if (boundingPolyBuilder_ == null) {
3398         boundingPolyBuilder_ =
3399             new com.google.protobuf.SingleFieldBuilderV3<
3400                 com.google.cloud.vision.v1.BoundingPoly,
3401                 com.google.cloud.vision.v1.BoundingPoly.Builder,
3402                 com.google.cloud.vision.v1.BoundingPolyOrBuilder>(
3403                 getBoundingPoly(), getParentForChildren(), isClean());
3404         boundingPoly_ = null;
3405       }
3406       return boundingPolyBuilder_;
3407     }
3408 
3409     private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_;
3410     private com.google.protobuf.SingleFieldBuilderV3<
3411             com.google.cloud.vision.v1.BoundingPoly,
3412             com.google.cloud.vision.v1.BoundingPoly.Builder,
3413             com.google.cloud.vision.v1.BoundingPolyOrBuilder>
3414         fdBoundingPolyBuilder_;
3415     /**
3416      *
3417      *
3418      * <pre>
3419      * The `fd_bounding_poly` bounding polygon is tighter than the
3420      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3421      * is used to eliminate the face from any image analysis that detects the
3422      * "amount of skin" visible in an image. It is not based on the
3423      * landmarker results, only on the initial face detection, hence
3424      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3425      * </pre>
3426      *
3427      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3428      *
3429      * @return Whether the fdBoundingPoly field is set.
3430      */
hasFdBoundingPoly()3431     public boolean hasFdBoundingPoly() {
3432       return ((bitField0_ & 0x00000002) != 0);
3433     }
3434     /**
3435      *
3436      *
3437      * <pre>
3438      * The `fd_bounding_poly` bounding polygon is tighter than the
3439      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3440      * is used to eliminate the face from any image analysis that detects the
3441      * "amount of skin" visible in an image. It is not based on the
3442      * landmarker results, only on the initial face detection, hence
3443      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3444      * </pre>
3445      *
3446      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3447      *
3448      * @return The fdBoundingPoly.
3449      */
getFdBoundingPoly()3450     public com.google.cloud.vision.v1.BoundingPoly getFdBoundingPoly() {
3451       if (fdBoundingPolyBuilder_ == null) {
3452         return fdBoundingPoly_ == null
3453             ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
3454             : fdBoundingPoly_;
3455       } else {
3456         return fdBoundingPolyBuilder_.getMessage();
3457       }
3458     }
3459     /**
3460      *
3461      *
3462      * <pre>
3463      * The `fd_bounding_poly` bounding polygon is tighter than the
3464      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3465      * is used to eliminate the face from any image analysis that detects the
3466      * "amount of skin" visible in an image. It is not based on the
3467      * landmarker results, only on the initial face detection, hence
3468      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3469      * </pre>
3470      *
3471      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3472      */
setFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value)3473     public Builder setFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) {
3474       if (fdBoundingPolyBuilder_ == null) {
3475         if (value == null) {
3476           throw new NullPointerException();
3477         }
3478         fdBoundingPoly_ = value;
3479       } else {
3480         fdBoundingPolyBuilder_.setMessage(value);
3481       }
3482       bitField0_ |= 0x00000002;
3483       onChanged();
3484       return this;
3485     }
3486     /**
3487      *
3488      *
3489      * <pre>
3490      * The `fd_bounding_poly` bounding polygon is tighter than the
3491      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3492      * is used to eliminate the face from any image analysis that detects the
3493      * "amount of skin" visible in an image. It is not based on the
3494      * landmarker results, only on the initial face detection, hence
3495      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3496      * </pre>
3497      *
3498      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3499      */
setFdBoundingPoly( com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue)3500     public Builder setFdBoundingPoly(
3501         com.google.cloud.vision.v1.BoundingPoly.Builder builderForValue) {
3502       if (fdBoundingPolyBuilder_ == null) {
3503         fdBoundingPoly_ = builderForValue.build();
3504       } else {
3505         fdBoundingPolyBuilder_.setMessage(builderForValue.build());
3506       }
3507       bitField0_ |= 0x00000002;
3508       onChanged();
3509       return this;
3510     }
3511     /**
3512      *
3513      *
3514      * <pre>
3515      * The `fd_bounding_poly` bounding polygon is tighter than the
3516      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3517      * is used to eliminate the face from any image analysis that detects the
3518      * "amount of skin" visible in an image. It is not based on the
3519      * landmarker results, only on the initial face detection, hence
3520      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3521      * </pre>
3522      *
3523      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3524      */
mergeFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value)3525     public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1.BoundingPoly value) {
3526       if (fdBoundingPolyBuilder_ == null) {
3527         if (((bitField0_ & 0x00000002) != 0)
3528             && fdBoundingPoly_ != null
3529             && fdBoundingPoly_ != com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()) {
3530           getFdBoundingPolyBuilder().mergeFrom(value);
3531         } else {
3532           fdBoundingPoly_ = value;
3533         }
3534       } else {
3535         fdBoundingPolyBuilder_.mergeFrom(value);
3536       }
3537       bitField0_ |= 0x00000002;
3538       onChanged();
3539       return this;
3540     }
3541     /**
3542      *
3543      *
3544      * <pre>
3545      * The `fd_bounding_poly` bounding polygon is tighter than the
3546      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3547      * is used to eliminate the face from any image analysis that detects the
3548      * "amount of skin" visible in an image. It is not based on the
3549      * landmarker results, only on the initial face detection, hence
3550      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3551      * </pre>
3552      *
3553      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3554      */
clearFdBoundingPoly()3555     public Builder clearFdBoundingPoly() {
3556       bitField0_ = (bitField0_ & ~0x00000002);
3557       fdBoundingPoly_ = null;
3558       if (fdBoundingPolyBuilder_ != null) {
3559         fdBoundingPolyBuilder_.dispose();
3560         fdBoundingPolyBuilder_ = null;
3561       }
3562       onChanged();
3563       return this;
3564     }
3565     /**
3566      *
3567      *
3568      * <pre>
3569      * The `fd_bounding_poly` bounding polygon is tighter than the
3570      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3571      * is used to eliminate the face from any image analysis that detects the
3572      * "amount of skin" visible in an image. It is not based on the
3573      * landmarker results, only on the initial face detection, hence
3574      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3575      * </pre>
3576      *
3577      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3578      */
getFdBoundingPolyBuilder()3579     public com.google.cloud.vision.v1.BoundingPoly.Builder getFdBoundingPolyBuilder() {
3580       bitField0_ |= 0x00000002;
3581       onChanged();
3582       return getFdBoundingPolyFieldBuilder().getBuilder();
3583     }
3584     /**
3585      *
3586      *
3587      * <pre>
3588      * The `fd_bounding_poly` bounding polygon is tighter than the
3589      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3590      * is used to eliminate the face from any image analysis that detects the
3591      * "amount of skin" visible in an image. It is not based on the
3592      * landmarker results, only on the initial face detection, hence
3593      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3594      * </pre>
3595      *
3596      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3597      */
getFdBoundingPolyOrBuilder()3598     public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() {
3599       if (fdBoundingPolyBuilder_ != null) {
3600         return fdBoundingPolyBuilder_.getMessageOrBuilder();
3601       } else {
3602         return fdBoundingPoly_ == null
3603             ? com.google.cloud.vision.v1.BoundingPoly.getDefaultInstance()
3604             : fdBoundingPoly_;
3605       }
3606     }
3607     /**
3608      *
3609      *
3610      * <pre>
3611      * The `fd_bounding_poly` bounding polygon is tighter than the
3612      * `boundingPoly`, and encloses only the skin part of the face. Typically, it
3613      * is used to eliminate the face from any image analysis that detects the
3614      * "amount of skin" visible in an image. It is not based on the
3615      * landmarker results, only on the initial face detection, hence
3616      * the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
3617      * </pre>
3618      *
3619      * <code>.google.cloud.vision.v1.BoundingPoly fd_bounding_poly = 2;</code>
3620      */
3621     private com.google.protobuf.SingleFieldBuilderV3<
3622             com.google.cloud.vision.v1.BoundingPoly,
3623             com.google.cloud.vision.v1.BoundingPoly.Builder,
3624             com.google.cloud.vision.v1.BoundingPolyOrBuilder>
getFdBoundingPolyFieldBuilder()3625         getFdBoundingPolyFieldBuilder() {
3626       if (fdBoundingPolyBuilder_ == null) {
3627         fdBoundingPolyBuilder_ =
3628             new com.google.protobuf.SingleFieldBuilderV3<
3629                 com.google.cloud.vision.v1.BoundingPoly,
3630                 com.google.cloud.vision.v1.BoundingPoly.Builder,
3631                 com.google.cloud.vision.v1.BoundingPolyOrBuilder>(
3632                 getFdBoundingPoly(), getParentForChildren(), isClean());
3633         fdBoundingPoly_ = null;
3634       }
3635       return fdBoundingPolyBuilder_;
3636     }
3637 
3638     private java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Landmark> landmarks_ =
3639         java.util.Collections.emptyList();
3640 
ensureLandmarksIsMutable()3641     private void ensureLandmarksIsMutable() {
3642       if (!((bitField0_ & 0x00000004) != 0)) {
3643         landmarks_ =
3644             new java.util.ArrayList<com.google.cloud.vision.v1.FaceAnnotation.Landmark>(landmarks_);
3645         bitField0_ |= 0x00000004;
3646       }
3647     }
3648 
3649     private com.google.protobuf.RepeatedFieldBuilderV3<
3650             com.google.cloud.vision.v1.FaceAnnotation.Landmark,
3651             com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder,
3652             com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>
3653         landmarksBuilder_;
3654 
3655     /**
3656      *
3657      *
3658      * <pre>
3659      * Detected face landmarks.
3660      * </pre>
3661      *
3662      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3663      */
getLandmarksList()3664     public java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Landmark> getLandmarksList() {
3665       if (landmarksBuilder_ == null) {
3666         return java.util.Collections.unmodifiableList(landmarks_);
3667       } else {
3668         return landmarksBuilder_.getMessageList();
3669       }
3670     }
3671     /**
3672      *
3673      *
3674      * <pre>
3675      * Detected face landmarks.
3676      * </pre>
3677      *
3678      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3679      */
getLandmarksCount()3680     public int getLandmarksCount() {
3681       if (landmarksBuilder_ == null) {
3682         return landmarks_.size();
3683       } else {
3684         return landmarksBuilder_.getCount();
3685       }
3686     }
3687     /**
3688      *
3689      *
3690      * <pre>
3691      * Detected face landmarks.
3692      * </pre>
3693      *
3694      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3695      */
getLandmarks(int index)3696     public com.google.cloud.vision.v1.FaceAnnotation.Landmark getLandmarks(int index) {
3697       if (landmarksBuilder_ == null) {
3698         return landmarks_.get(index);
3699       } else {
3700         return landmarksBuilder_.getMessage(index);
3701       }
3702     }
3703     /**
3704      *
3705      *
3706      * <pre>
3707      * Detected face landmarks.
3708      * </pre>
3709      *
3710      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3711      */
setLandmarks( int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value)3712     public Builder setLandmarks(
3713         int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) {
3714       if (landmarksBuilder_ == null) {
3715         if (value == null) {
3716           throw new NullPointerException();
3717         }
3718         ensureLandmarksIsMutable();
3719         landmarks_.set(index, value);
3720         onChanged();
3721       } else {
3722         landmarksBuilder_.setMessage(index, value);
3723       }
3724       return this;
3725     }
3726     /**
3727      *
3728      *
3729      * <pre>
3730      * Detected face landmarks.
3731      * </pre>
3732      *
3733      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3734      */
setLandmarks( int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue)3735     public Builder setLandmarks(
3736         int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) {
3737       if (landmarksBuilder_ == null) {
3738         ensureLandmarksIsMutable();
3739         landmarks_.set(index, builderForValue.build());
3740         onChanged();
3741       } else {
3742         landmarksBuilder_.setMessage(index, builderForValue.build());
3743       }
3744       return this;
3745     }
3746     /**
3747      *
3748      *
3749      * <pre>
3750      * Detected face landmarks.
3751      * </pre>
3752      *
3753      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3754      */
addLandmarks(com.google.cloud.vision.v1.FaceAnnotation.Landmark value)3755     public Builder addLandmarks(com.google.cloud.vision.v1.FaceAnnotation.Landmark value) {
3756       if (landmarksBuilder_ == null) {
3757         if (value == null) {
3758           throw new NullPointerException();
3759         }
3760         ensureLandmarksIsMutable();
3761         landmarks_.add(value);
3762         onChanged();
3763       } else {
3764         landmarksBuilder_.addMessage(value);
3765       }
3766       return this;
3767     }
3768     /**
3769      *
3770      *
3771      * <pre>
3772      * Detected face landmarks.
3773      * </pre>
3774      *
3775      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3776      */
addLandmarks( int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value)3777     public Builder addLandmarks(
3778         int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark value) {
3779       if (landmarksBuilder_ == null) {
3780         if (value == null) {
3781           throw new NullPointerException();
3782         }
3783         ensureLandmarksIsMutable();
3784         landmarks_.add(index, value);
3785         onChanged();
3786       } else {
3787         landmarksBuilder_.addMessage(index, value);
3788       }
3789       return this;
3790     }
3791     /**
3792      *
3793      *
3794      * <pre>
3795      * Detected face landmarks.
3796      * </pre>
3797      *
3798      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3799      */
addLandmarks( com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue)3800     public Builder addLandmarks(
3801         com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) {
3802       if (landmarksBuilder_ == null) {
3803         ensureLandmarksIsMutable();
3804         landmarks_.add(builderForValue.build());
3805         onChanged();
3806       } else {
3807         landmarksBuilder_.addMessage(builderForValue.build());
3808       }
3809       return this;
3810     }
3811     /**
3812      *
3813      *
3814      * <pre>
3815      * Detected face landmarks.
3816      * </pre>
3817      *
3818      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3819      */
addLandmarks( int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue)3820     public Builder addLandmarks(
3821         int index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder builderForValue) {
3822       if (landmarksBuilder_ == null) {
3823         ensureLandmarksIsMutable();
3824         landmarks_.add(index, builderForValue.build());
3825         onChanged();
3826       } else {
3827         landmarksBuilder_.addMessage(index, builderForValue.build());
3828       }
3829       return this;
3830     }
3831     /**
3832      *
3833      *
3834      * <pre>
3835      * Detected face landmarks.
3836      * </pre>
3837      *
3838      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3839      */
addAllLandmarks( java.lang.Iterable<? extends com.google.cloud.vision.v1.FaceAnnotation.Landmark> values)3840     public Builder addAllLandmarks(
3841         java.lang.Iterable<? extends com.google.cloud.vision.v1.FaceAnnotation.Landmark> values) {
3842       if (landmarksBuilder_ == null) {
3843         ensureLandmarksIsMutable();
3844         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarks_);
3845         onChanged();
3846       } else {
3847         landmarksBuilder_.addAllMessages(values);
3848       }
3849       return this;
3850     }
3851     /**
3852      *
3853      *
3854      * <pre>
3855      * Detected face landmarks.
3856      * </pre>
3857      *
3858      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3859      */
clearLandmarks()3860     public Builder clearLandmarks() {
3861       if (landmarksBuilder_ == null) {
3862         landmarks_ = java.util.Collections.emptyList();
3863         bitField0_ = (bitField0_ & ~0x00000004);
3864         onChanged();
3865       } else {
3866         landmarksBuilder_.clear();
3867       }
3868       return this;
3869     }
3870     /**
3871      *
3872      *
3873      * <pre>
3874      * Detected face landmarks.
3875      * </pre>
3876      *
3877      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3878      */
removeLandmarks(int index)3879     public Builder removeLandmarks(int index) {
3880       if (landmarksBuilder_ == null) {
3881         ensureLandmarksIsMutable();
3882         landmarks_.remove(index);
3883         onChanged();
3884       } else {
3885         landmarksBuilder_.remove(index);
3886       }
3887       return this;
3888     }
3889     /**
3890      *
3891      *
3892      * <pre>
3893      * Detected face landmarks.
3894      * </pre>
3895      *
3896      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3897      */
getLandmarksBuilder( int index)3898     public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder getLandmarksBuilder(
3899         int index) {
3900       return getLandmarksFieldBuilder().getBuilder(index);
3901     }
3902     /**
3903      *
3904      *
3905      * <pre>
3906      * Detected face landmarks.
3907      * </pre>
3908      *
3909      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3910      */
getLandmarksOrBuilder( int index)3911     public com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(
3912         int index) {
3913       if (landmarksBuilder_ == null) {
3914         return landmarks_.get(index);
3915       } else {
3916         return landmarksBuilder_.getMessageOrBuilder(index);
3917       }
3918     }
3919     /**
3920      *
3921      *
3922      * <pre>
3923      * Detected face landmarks.
3924      * </pre>
3925      *
3926      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3927      */
3928     public java.util.List<? extends com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>
getLandmarksOrBuilderList()3929         getLandmarksOrBuilderList() {
3930       if (landmarksBuilder_ != null) {
3931         return landmarksBuilder_.getMessageOrBuilderList();
3932       } else {
3933         return java.util.Collections.unmodifiableList(landmarks_);
3934       }
3935     }
3936     /**
3937      *
3938      *
3939      * <pre>
3940      * Detected face landmarks.
3941      * </pre>
3942      *
3943      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3944      */
addLandmarksBuilder()3945     public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() {
3946       return getLandmarksFieldBuilder()
3947           .addBuilder(com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance());
3948     }
3949     /**
3950      *
3951      *
3952      * <pre>
3953      * Detected face landmarks.
3954      * </pre>
3955      *
3956      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3957      */
addLandmarksBuilder( int index)3958     public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBuilder(
3959         int index) {
3960       return getLandmarksFieldBuilder()
3961           .addBuilder(
3962               index, com.google.cloud.vision.v1.FaceAnnotation.Landmark.getDefaultInstance());
3963     }
3964     /**
3965      *
3966      *
3967      * <pre>
3968      * Detected face landmarks.
3969      * </pre>
3970      *
3971      * <code>repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;</code>
3972      */
3973     public java.util.List<com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder>
getLandmarksBuilderList()3974         getLandmarksBuilderList() {
3975       return getLandmarksFieldBuilder().getBuilderList();
3976     }
3977 
3978     private com.google.protobuf.RepeatedFieldBuilderV3<
3979             com.google.cloud.vision.v1.FaceAnnotation.Landmark,
3980             com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder,
3981             com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>
getLandmarksFieldBuilder()3982         getLandmarksFieldBuilder() {
3983       if (landmarksBuilder_ == null) {
3984         landmarksBuilder_ =
3985             new com.google.protobuf.RepeatedFieldBuilderV3<
3986                 com.google.cloud.vision.v1.FaceAnnotation.Landmark,
3987                 com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder,
3988                 com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>(
3989                 landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean());
3990         landmarks_ = null;
3991       }
3992       return landmarksBuilder_;
3993     }
3994 
3995     private float rollAngle_;
3996     /**
3997      *
3998      *
3999      * <pre>
4000      * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
4001      * of the face relative to the image vertical about the axis perpendicular to
4002      * the face. Range [-180,180].
4003      * </pre>
4004      *
4005      * <code>float roll_angle = 4;</code>
4006      *
4007      * @return The rollAngle.
4008      */
4009     @java.lang.Override
getRollAngle()4010     public float getRollAngle() {
4011       return rollAngle_;
4012     }
4013     /**
4014      *
4015      *
4016      * <pre>
4017      * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
4018      * of the face relative to the image vertical about the axis perpendicular to
4019      * the face. Range [-180,180].
4020      * </pre>
4021      *
4022      * <code>float roll_angle = 4;</code>
4023      *
4024      * @param value The rollAngle to set.
4025      * @return This builder for chaining.
4026      */
setRollAngle(float value)4027     public Builder setRollAngle(float value) {
4028 
4029       rollAngle_ = value;
4030       bitField0_ |= 0x00000008;
4031       onChanged();
4032       return this;
4033     }
4034     /**
4035      *
4036      *
4037      * <pre>
4038      * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
4039      * of the face relative to the image vertical about the axis perpendicular to
4040      * the face. Range [-180,180].
4041      * </pre>
4042      *
4043      * <code>float roll_angle = 4;</code>
4044      *
4045      * @return This builder for chaining.
4046      */
clearRollAngle()4047     public Builder clearRollAngle() {
4048       bitField0_ = (bitField0_ & ~0x00000008);
4049       rollAngle_ = 0F;
4050       onChanged();
4051       return this;
4052     }
4053 
4054     private float panAngle_;
4055     /**
4056      *
4057      *
4058      * <pre>
4059      * Yaw angle, which indicates the leftward/rightward angle that the face is
4060      * pointing relative to the vertical plane perpendicular to the image. Range
4061      * [-180,180].
4062      * </pre>
4063      *
4064      * <code>float pan_angle = 5;</code>
4065      *
4066      * @return The panAngle.
4067      */
4068     @java.lang.Override
getPanAngle()4069     public float getPanAngle() {
4070       return panAngle_;
4071     }
4072     /**
4073      *
4074      *
4075      * <pre>
4076      * Yaw angle, which indicates the leftward/rightward angle that the face is
4077      * pointing relative to the vertical plane perpendicular to the image. Range
4078      * [-180,180].
4079      * </pre>
4080      *
4081      * <code>float pan_angle = 5;</code>
4082      *
4083      * @param value The panAngle to set.
4084      * @return This builder for chaining.
4085      */
setPanAngle(float value)4086     public Builder setPanAngle(float value) {
4087 
4088       panAngle_ = value;
4089       bitField0_ |= 0x00000010;
4090       onChanged();
4091       return this;
4092     }
4093     /**
4094      *
4095      *
4096      * <pre>
4097      * Yaw angle, which indicates the leftward/rightward angle that the face is
4098      * pointing relative to the vertical plane perpendicular to the image. Range
4099      * [-180,180].
4100      * </pre>
4101      *
4102      * <code>float pan_angle = 5;</code>
4103      *
4104      * @return This builder for chaining.
4105      */
clearPanAngle()4106     public Builder clearPanAngle() {
4107       bitField0_ = (bitField0_ & ~0x00000010);
4108       panAngle_ = 0F;
4109       onChanged();
4110       return this;
4111     }
4112 
4113     private float tiltAngle_;
4114     /**
4115      *
4116      *
4117      * <pre>
4118      * Pitch angle, which indicates the upwards/downwards angle that the face is
4119      * pointing relative to the image's horizontal plane. Range [-180,180].
4120      * </pre>
4121      *
4122      * <code>float tilt_angle = 6;</code>
4123      *
4124      * @return The tiltAngle.
4125      */
4126     @java.lang.Override
getTiltAngle()4127     public float getTiltAngle() {
4128       return tiltAngle_;
4129     }
4130     /**
4131      *
4132      *
4133      * <pre>
4134      * Pitch angle, which indicates the upwards/downwards angle that the face is
4135      * pointing relative to the image's horizontal plane. Range [-180,180].
4136      * </pre>
4137      *
4138      * <code>float tilt_angle = 6;</code>
4139      *
4140      * @param value The tiltAngle to set.
4141      * @return This builder for chaining.
4142      */
setTiltAngle(float value)4143     public Builder setTiltAngle(float value) {
4144 
4145       tiltAngle_ = value;
4146       bitField0_ |= 0x00000020;
4147       onChanged();
4148       return this;
4149     }
4150     /**
4151      *
4152      *
4153      * <pre>
4154      * Pitch angle, which indicates the upwards/downwards angle that the face is
4155      * pointing relative to the image's horizontal plane. Range [-180,180].
4156      * </pre>
4157      *
4158      * <code>float tilt_angle = 6;</code>
4159      *
4160      * @return This builder for chaining.
4161      */
clearTiltAngle()4162     public Builder clearTiltAngle() {
4163       bitField0_ = (bitField0_ & ~0x00000020);
4164       tiltAngle_ = 0F;
4165       onChanged();
4166       return this;
4167     }
4168 
4169     private float detectionConfidence_;
4170     /**
4171      *
4172      *
4173      * <pre>
4174      * Detection confidence. Range [0, 1].
4175      * </pre>
4176      *
4177      * <code>float detection_confidence = 7;</code>
4178      *
4179      * @return The detectionConfidence.
4180      */
4181     @java.lang.Override
getDetectionConfidence()4182     public float getDetectionConfidence() {
4183       return detectionConfidence_;
4184     }
4185     /**
4186      *
4187      *
4188      * <pre>
4189      * Detection confidence. Range [0, 1].
4190      * </pre>
4191      *
4192      * <code>float detection_confidence = 7;</code>
4193      *
4194      * @param value The detectionConfidence to set.
4195      * @return This builder for chaining.
4196      */
setDetectionConfidence(float value)4197     public Builder setDetectionConfidence(float value) {
4198 
4199       detectionConfidence_ = value;
4200       bitField0_ |= 0x00000040;
4201       onChanged();
4202       return this;
4203     }
4204     /**
4205      *
4206      *
4207      * <pre>
4208      * Detection confidence. Range [0, 1].
4209      * </pre>
4210      *
4211      * <code>float detection_confidence = 7;</code>
4212      *
4213      * @return This builder for chaining.
4214      */
clearDetectionConfidence()4215     public Builder clearDetectionConfidence() {
4216       bitField0_ = (bitField0_ & ~0x00000040);
4217       detectionConfidence_ = 0F;
4218       onChanged();
4219       return this;
4220     }
4221 
4222     private float landmarkingConfidence_;
4223     /**
4224      *
4225      *
4226      * <pre>
4227      * Face landmarking confidence. Range [0, 1].
4228      * </pre>
4229      *
4230      * <code>float landmarking_confidence = 8;</code>
4231      *
4232      * @return The landmarkingConfidence.
4233      */
4234     @java.lang.Override
getLandmarkingConfidence()4235     public float getLandmarkingConfidence() {
4236       return landmarkingConfidence_;
4237     }
4238     /**
4239      *
4240      *
4241      * <pre>
4242      * Face landmarking confidence. Range [0, 1].
4243      * </pre>
4244      *
4245      * <code>float landmarking_confidence = 8;</code>
4246      *
4247      * @param value The landmarkingConfidence to set.
4248      * @return This builder for chaining.
4249      */
setLandmarkingConfidence(float value)4250     public Builder setLandmarkingConfidence(float value) {
4251 
4252       landmarkingConfidence_ = value;
4253       bitField0_ |= 0x00000080;
4254       onChanged();
4255       return this;
4256     }
4257     /**
4258      *
4259      *
4260      * <pre>
4261      * Face landmarking confidence. Range [0, 1].
4262      * </pre>
4263      *
4264      * <code>float landmarking_confidence = 8;</code>
4265      *
4266      * @return This builder for chaining.
4267      */
clearLandmarkingConfidence()4268     public Builder clearLandmarkingConfidence() {
4269       bitField0_ = (bitField0_ & ~0x00000080);
4270       landmarkingConfidence_ = 0F;
4271       onChanged();
4272       return this;
4273     }
4274 
4275     private int joyLikelihood_ = 0;
4276     /**
4277      *
4278      *
4279      * <pre>
4280      * Joy likelihood.
4281      * </pre>
4282      *
4283      * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
4284      *
4285      * @return The enum numeric value on the wire for joyLikelihood.
4286      */
4287     @java.lang.Override
getJoyLikelihoodValue()4288     public int getJoyLikelihoodValue() {
4289       return joyLikelihood_;
4290     }
4291     /**
4292      *
4293      *
4294      * <pre>
4295      * Joy likelihood.
4296      * </pre>
4297      *
4298      * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
4299      *
4300      * @param value The enum numeric value on the wire for joyLikelihood to set.
4301      * @return This builder for chaining.
4302      */
setJoyLikelihoodValue(int value)4303     public Builder setJoyLikelihoodValue(int value) {
4304       joyLikelihood_ = value;
4305       bitField0_ |= 0x00000100;
4306       onChanged();
4307       return this;
4308     }
4309     /**
4310      *
4311      *
4312      * <pre>
4313      * Joy likelihood.
4314      * </pre>
4315      *
4316      * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
4317      *
4318      * @return The joyLikelihood.
4319      */
4320     @java.lang.Override
getJoyLikelihood()4321     public com.google.cloud.vision.v1.Likelihood getJoyLikelihood() {
4322       com.google.cloud.vision.v1.Likelihood result =
4323           com.google.cloud.vision.v1.Likelihood.forNumber(joyLikelihood_);
4324       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4325     }
4326     /**
4327      *
4328      *
4329      * <pre>
4330      * Joy likelihood.
4331      * </pre>
4332      *
4333      * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
4334      *
4335      * @param value The joyLikelihood to set.
4336      * @return This builder for chaining.
4337      */
setJoyLikelihood(com.google.cloud.vision.v1.Likelihood value)4338     public Builder setJoyLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4339       if (value == null) {
4340         throw new NullPointerException();
4341       }
4342       bitField0_ |= 0x00000100;
4343       joyLikelihood_ = value.getNumber();
4344       onChanged();
4345       return this;
4346     }
4347     /**
4348      *
4349      *
4350      * <pre>
4351      * Joy likelihood.
4352      * </pre>
4353      *
4354      * <code>.google.cloud.vision.v1.Likelihood joy_likelihood = 9;</code>
4355      *
4356      * @return This builder for chaining.
4357      */
clearJoyLikelihood()4358     public Builder clearJoyLikelihood() {
4359       bitField0_ = (bitField0_ & ~0x00000100);
4360       joyLikelihood_ = 0;
4361       onChanged();
4362       return this;
4363     }
4364 
4365     private int sorrowLikelihood_ = 0;
4366     /**
4367      *
4368      *
4369      * <pre>
4370      * Sorrow likelihood.
4371      * </pre>
4372      *
4373      * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
4374      *
4375      * @return The enum numeric value on the wire for sorrowLikelihood.
4376      */
4377     @java.lang.Override
getSorrowLikelihoodValue()4378     public int getSorrowLikelihoodValue() {
4379       return sorrowLikelihood_;
4380     }
4381     /**
4382      *
4383      *
4384      * <pre>
4385      * Sorrow likelihood.
4386      * </pre>
4387      *
4388      * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
4389      *
4390      * @param value The enum numeric value on the wire for sorrowLikelihood to set.
4391      * @return This builder for chaining.
4392      */
setSorrowLikelihoodValue(int value)4393     public Builder setSorrowLikelihoodValue(int value) {
4394       sorrowLikelihood_ = value;
4395       bitField0_ |= 0x00000200;
4396       onChanged();
4397       return this;
4398     }
4399     /**
4400      *
4401      *
4402      * <pre>
4403      * Sorrow likelihood.
4404      * </pre>
4405      *
4406      * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
4407      *
4408      * @return The sorrowLikelihood.
4409      */
4410     @java.lang.Override
getSorrowLikelihood()4411     public com.google.cloud.vision.v1.Likelihood getSorrowLikelihood() {
4412       com.google.cloud.vision.v1.Likelihood result =
4413           com.google.cloud.vision.v1.Likelihood.forNumber(sorrowLikelihood_);
4414       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4415     }
4416     /**
4417      *
4418      *
4419      * <pre>
4420      * Sorrow likelihood.
4421      * </pre>
4422      *
4423      * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
4424      *
4425      * @param value The sorrowLikelihood to set.
4426      * @return This builder for chaining.
4427      */
setSorrowLikelihood(com.google.cloud.vision.v1.Likelihood value)4428     public Builder setSorrowLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4429       if (value == null) {
4430         throw new NullPointerException();
4431       }
4432       bitField0_ |= 0x00000200;
4433       sorrowLikelihood_ = value.getNumber();
4434       onChanged();
4435       return this;
4436     }
4437     /**
4438      *
4439      *
4440      * <pre>
4441      * Sorrow likelihood.
4442      * </pre>
4443      *
4444      * <code>.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;</code>
4445      *
4446      * @return This builder for chaining.
4447      */
clearSorrowLikelihood()4448     public Builder clearSorrowLikelihood() {
4449       bitField0_ = (bitField0_ & ~0x00000200);
4450       sorrowLikelihood_ = 0;
4451       onChanged();
4452       return this;
4453     }
4454 
4455     private int angerLikelihood_ = 0;
4456     /**
4457      *
4458      *
4459      * <pre>
4460      * Anger likelihood.
4461      * </pre>
4462      *
4463      * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
4464      *
4465      * @return The enum numeric value on the wire for angerLikelihood.
4466      */
4467     @java.lang.Override
getAngerLikelihoodValue()4468     public int getAngerLikelihoodValue() {
4469       return angerLikelihood_;
4470     }
4471     /**
4472      *
4473      *
4474      * <pre>
4475      * Anger likelihood.
4476      * </pre>
4477      *
4478      * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
4479      *
4480      * @param value The enum numeric value on the wire for angerLikelihood to set.
4481      * @return This builder for chaining.
4482      */
setAngerLikelihoodValue(int value)4483     public Builder setAngerLikelihoodValue(int value) {
4484       angerLikelihood_ = value;
4485       bitField0_ |= 0x00000400;
4486       onChanged();
4487       return this;
4488     }
4489     /**
4490      *
4491      *
4492      * <pre>
4493      * Anger likelihood.
4494      * </pre>
4495      *
4496      * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
4497      *
4498      * @return The angerLikelihood.
4499      */
4500     @java.lang.Override
getAngerLikelihood()4501     public com.google.cloud.vision.v1.Likelihood getAngerLikelihood() {
4502       com.google.cloud.vision.v1.Likelihood result =
4503           com.google.cloud.vision.v1.Likelihood.forNumber(angerLikelihood_);
4504       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4505     }
4506     /**
4507      *
4508      *
4509      * <pre>
4510      * Anger likelihood.
4511      * </pre>
4512      *
4513      * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
4514      *
4515      * @param value The angerLikelihood to set.
4516      * @return This builder for chaining.
4517      */
setAngerLikelihood(com.google.cloud.vision.v1.Likelihood value)4518     public Builder setAngerLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4519       if (value == null) {
4520         throw new NullPointerException();
4521       }
4522       bitField0_ |= 0x00000400;
4523       angerLikelihood_ = value.getNumber();
4524       onChanged();
4525       return this;
4526     }
4527     /**
4528      *
4529      *
4530      * <pre>
4531      * Anger likelihood.
4532      * </pre>
4533      *
4534      * <code>.google.cloud.vision.v1.Likelihood anger_likelihood = 11;</code>
4535      *
4536      * @return This builder for chaining.
4537      */
clearAngerLikelihood()4538     public Builder clearAngerLikelihood() {
4539       bitField0_ = (bitField0_ & ~0x00000400);
4540       angerLikelihood_ = 0;
4541       onChanged();
4542       return this;
4543     }
4544 
4545     private int surpriseLikelihood_ = 0;
4546     /**
4547      *
4548      *
4549      * <pre>
4550      * Surprise likelihood.
4551      * </pre>
4552      *
4553      * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
4554      *
4555      * @return The enum numeric value on the wire for surpriseLikelihood.
4556      */
4557     @java.lang.Override
getSurpriseLikelihoodValue()4558     public int getSurpriseLikelihoodValue() {
4559       return surpriseLikelihood_;
4560     }
4561     /**
4562      *
4563      *
4564      * <pre>
4565      * Surprise likelihood.
4566      * </pre>
4567      *
4568      * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
4569      *
4570      * @param value The enum numeric value on the wire for surpriseLikelihood to set.
4571      * @return This builder for chaining.
4572      */
setSurpriseLikelihoodValue(int value)4573     public Builder setSurpriseLikelihoodValue(int value) {
4574       surpriseLikelihood_ = value;
4575       bitField0_ |= 0x00000800;
4576       onChanged();
4577       return this;
4578     }
4579     /**
4580      *
4581      *
4582      * <pre>
4583      * Surprise likelihood.
4584      * </pre>
4585      *
4586      * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
4587      *
4588      * @return The surpriseLikelihood.
4589      */
4590     @java.lang.Override
getSurpriseLikelihood()4591     public com.google.cloud.vision.v1.Likelihood getSurpriseLikelihood() {
4592       com.google.cloud.vision.v1.Likelihood result =
4593           com.google.cloud.vision.v1.Likelihood.forNumber(surpriseLikelihood_);
4594       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4595     }
4596     /**
4597      *
4598      *
4599      * <pre>
4600      * Surprise likelihood.
4601      * </pre>
4602      *
4603      * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
4604      *
4605      * @param value The surpriseLikelihood to set.
4606      * @return This builder for chaining.
4607      */
setSurpriseLikelihood(com.google.cloud.vision.v1.Likelihood value)4608     public Builder setSurpriseLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4609       if (value == null) {
4610         throw new NullPointerException();
4611       }
4612       bitField0_ |= 0x00000800;
4613       surpriseLikelihood_ = value.getNumber();
4614       onChanged();
4615       return this;
4616     }
4617     /**
4618      *
4619      *
4620      * <pre>
4621      * Surprise likelihood.
4622      * </pre>
4623      *
4624      * <code>.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;</code>
4625      *
4626      * @return This builder for chaining.
4627      */
clearSurpriseLikelihood()4628     public Builder clearSurpriseLikelihood() {
4629       bitField0_ = (bitField0_ & ~0x00000800);
4630       surpriseLikelihood_ = 0;
4631       onChanged();
4632       return this;
4633     }
4634 
4635     private int underExposedLikelihood_ = 0;
4636     /**
4637      *
4638      *
4639      * <pre>
4640      * Under-exposed likelihood.
4641      * </pre>
4642      *
4643      * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
4644      *
4645      * @return The enum numeric value on the wire for underExposedLikelihood.
4646      */
4647     @java.lang.Override
getUnderExposedLikelihoodValue()4648     public int getUnderExposedLikelihoodValue() {
4649       return underExposedLikelihood_;
4650     }
4651     /**
4652      *
4653      *
4654      * <pre>
4655      * Under-exposed likelihood.
4656      * </pre>
4657      *
4658      * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
4659      *
4660      * @param value The enum numeric value on the wire for underExposedLikelihood to set.
4661      * @return This builder for chaining.
4662      */
setUnderExposedLikelihoodValue(int value)4663     public Builder setUnderExposedLikelihoodValue(int value) {
4664       underExposedLikelihood_ = value;
4665       bitField0_ |= 0x00001000;
4666       onChanged();
4667       return this;
4668     }
4669     /**
4670      *
4671      *
4672      * <pre>
4673      * Under-exposed likelihood.
4674      * </pre>
4675      *
4676      * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
4677      *
4678      * @return The underExposedLikelihood.
4679      */
4680     @java.lang.Override
getUnderExposedLikelihood()4681     public com.google.cloud.vision.v1.Likelihood getUnderExposedLikelihood() {
4682       com.google.cloud.vision.v1.Likelihood result =
4683           com.google.cloud.vision.v1.Likelihood.forNumber(underExposedLikelihood_);
4684       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4685     }
4686     /**
4687      *
4688      *
4689      * <pre>
4690      * Under-exposed likelihood.
4691      * </pre>
4692      *
4693      * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
4694      *
4695      * @param value The underExposedLikelihood to set.
4696      * @return This builder for chaining.
4697      */
setUnderExposedLikelihood(com.google.cloud.vision.v1.Likelihood value)4698     public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4699       if (value == null) {
4700         throw new NullPointerException();
4701       }
4702       bitField0_ |= 0x00001000;
4703       underExposedLikelihood_ = value.getNumber();
4704       onChanged();
4705       return this;
4706     }
4707     /**
4708      *
4709      *
4710      * <pre>
4711      * Under-exposed likelihood.
4712      * </pre>
4713      *
4714      * <code>.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;</code>
4715      *
4716      * @return This builder for chaining.
4717      */
clearUnderExposedLikelihood()4718     public Builder clearUnderExposedLikelihood() {
4719       bitField0_ = (bitField0_ & ~0x00001000);
4720       underExposedLikelihood_ = 0;
4721       onChanged();
4722       return this;
4723     }
4724 
4725     private int blurredLikelihood_ = 0;
4726     /**
4727      *
4728      *
4729      * <pre>
4730      * Blurred likelihood.
4731      * </pre>
4732      *
4733      * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
4734      *
4735      * @return The enum numeric value on the wire for blurredLikelihood.
4736      */
4737     @java.lang.Override
getBlurredLikelihoodValue()4738     public int getBlurredLikelihoodValue() {
4739       return blurredLikelihood_;
4740     }
4741     /**
4742      *
4743      *
4744      * <pre>
4745      * Blurred likelihood.
4746      * </pre>
4747      *
4748      * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
4749      *
4750      * @param value The enum numeric value on the wire for blurredLikelihood to set.
4751      * @return This builder for chaining.
4752      */
setBlurredLikelihoodValue(int value)4753     public Builder setBlurredLikelihoodValue(int value) {
4754       blurredLikelihood_ = value;
4755       bitField0_ |= 0x00002000;
4756       onChanged();
4757       return this;
4758     }
4759     /**
4760      *
4761      *
4762      * <pre>
4763      * Blurred likelihood.
4764      * </pre>
4765      *
4766      * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
4767      *
4768      * @return The blurredLikelihood.
4769      */
4770     @java.lang.Override
getBlurredLikelihood()4771     public com.google.cloud.vision.v1.Likelihood getBlurredLikelihood() {
4772       com.google.cloud.vision.v1.Likelihood result =
4773           com.google.cloud.vision.v1.Likelihood.forNumber(blurredLikelihood_);
4774       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4775     }
4776     /**
4777      *
4778      *
4779      * <pre>
4780      * Blurred likelihood.
4781      * </pre>
4782      *
4783      * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
4784      *
4785      * @param value The blurredLikelihood to set.
4786      * @return This builder for chaining.
4787      */
setBlurredLikelihood(com.google.cloud.vision.v1.Likelihood value)4788     public Builder setBlurredLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4789       if (value == null) {
4790         throw new NullPointerException();
4791       }
4792       bitField0_ |= 0x00002000;
4793       blurredLikelihood_ = value.getNumber();
4794       onChanged();
4795       return this;
4796     }
4797     /**
4798      *
4799      *
4800      * <pre>
4801      * Blurred likelihood.
4802      * </pre>
4803      *
4804      * <code>.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;</code>
4805      *
4806      * @return This builder for chaining.
4807      */
clearBlurredLikelihood()4808     public Builder clearBlurredLikelihood() {
4809       bitField0_ = (bitField0_ & ~0x00002000);
4810       blurredLikelihood_ = 0;
4811       onChanged();
4812       return this;
4813     }
4814 
4815     private int headwearLikelihood_ = 0;
4816     /**
4817      *
4818      *
4819      * <pre>
4820      * Headwear likelihood.
4821      * </pre>
4822      *
4823      * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
4824      *
4825      * @return The enum numeric value on the wire for headwearLikelihood.
4826      */
4827     @java.lang.Override
getHeadwearLikelihoodValue()4828     public int getHeadwearLikelihoodValue() {
4829       return headwearLikelihood_;
4830     }
4831     /**
4832      *
4833      *
4834      * <pre>
4835      * Headwear likelihood.
4836      * </pre>
4837      *
4838      * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
4839      *
4840      * @param value The enum numeric value on the wire for headwearLikelihood to set.
4841      * @return This builder for chaining.
4842      */
setHeadwearLikelihoodValue(int value)4843     public Builder setHeadwearLikelihoodValue(int value) {
4844       headwearLikelihood_ = value;
4845       bitField0_ |= 0x00004000;
4846       onChanged();
4847       return this;
4848     }
4849     /**
4850      *
4851      *
4852      * <pre>
4853      * Headwear likelihood.
4854      * </pre>
4855      *
4856      * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
4857      *
4858      * @return The headwearLikelihood.
4859      */
4860     @java.lang.Override
getHeadwearLikelihood()4861     public com.google.cloud.vision.v1.Likelihood getHeadwearLikelihood() {
4862       com.google.cloud.vision.v1.Likelihood result =
4863           com.google.cloud.vision.v1.Likelihood.forNumber(headwearLikelihood_);
4864       return result == null ? com.google.cloud.vision.v1.Likelihood.UNRECOGNIZED : result;
4865     }
4866     /**
4867      *
4868      *
4869      * <pre>
4870      * Headwear likelihood.
4871      * </pre>
4872      *
4873      * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
4874      *
4875      * @param value The headwearLikelihood to set.
4876      * @return This builder for chaining.
4877      */
setHeadwearLikelihood(com.google.cloud.vision.v1.Likelihood value)4878     public Builder setHeadwearLikelihood(com.google.cloud.vision.v1.Likelihood value) {
4879       if (value == null) {
4880         throw new NullPointerException();
4881       }
4882       bitField0_ |= 0x00004000;
4883       headwearLikelihood_ = value.getNumber();
4884       onChanged();
4885       return this;
4886     }
4887     /**
4888      *
4889      *
4890      * <pre>
4891      * Headwear likelihood.
4892      * </pre>
4893      *
4894      * <code>.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;</code>
4895      *
4896      * @return This builder for chaining.
4897      */
clearHeadwearLikelihood()4898     public Builder clearHeadwearLikelihood() {
4899       bitField0_ = (bitField0_ & ~0x00004000);
4900       headwearLikelihood_ = 0;
4901       onChanged();
4902       return this;
4903     }
4904 
4905     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4906     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
4907       return super.setUnknownFields(unknownFields);
4908     }
4909 
4910     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4911     public final Builder mergeUnknownFields(
4912         final com.google.protobuf.UnknownFieldSet unknownFields) {
4913       return super.mergeUnknownFields(unknownFields);
4914     }
4915 
4916     // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.FaceAnnotation)
4917   }
4918 
4919   // @@protoc_insertion_point(class_scope:google.cloud.vision.v1.FaceAnnotation)
4920   private static final com.google.cloud.vision.v1.FaceAnnotation DEFAULT_INSTANCE;
4921 
4922   static {
4923     DEFAULT_INSTANCE = new com.google.cloud.vision.v1.FaceAnnotation();
4924   }
4925 
getDefaultInstance()4926   public static com.google.cloud.vision.v1.FaceAnnotation getDefaultInstance() {
4927     return DEFAULT_INSTANCE;
4928   }
4929 
4930   private static final com.google.protobuf.Parser<FaceAnnotation> PARSER =
4931       new com.google.protobuf.AbstractParser<FaceAnnotation>() {
4932         @java.lang.Override
4933         public FaceAnnotation parsePartialFrom(
4934             com.google.protobuf.CodedInputStream input,
4935             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4936             throws com.google.protobuf.InvalidProtocolBufferException {
4937           Builder builder = newBuilder();
4938           try {
4939             builder.mergeFrom(input, extensionRegistry);
4940           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4941             throw e.setUnfinishedMessage(builder.buildPartial());
4942           } catch (com.google.protobuf.UninitializedMessageException e) {
4943             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4944           } catch (java.io.IOException e) {
4945             throw new com.google.protobuf.InvalidProtocolBufferException(e)
4946                 .setUnfinishedMessage(builder.buildPartial());
4947           }
4948           return builder.buildPartial();
4949         }
4950       };
4951 
parser()4952   public static com.google.protobuf.Parser<FaceAnnotation> parser() {
4953     return PARSER;
4954   }
4955 
4956   @java.lang.Override
getParserForType()4957   public com.google.protobuf.Parser<FaceAnnotation> getParserForType() {
4958     return PARSER;
4959   }
4960 
4961   @java.lang.Override
getDefaultInstanceForType()4962   public com.google.cloud.vision.v1.FaceAnnotation getDefaultInstanceForType() {
4963     return DEFAULT_INSTANCE;
4964   }
4965 }
4966