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

com.google.cloud.vision.v1p3beta1.FaceAnnotation Maven / Gradle / Ivy

There is a newer version: 0.136.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/vision/v1p3beta1/image_annotator.proto

// Protobuf Java Version: 3.25.4
package com.google.cloud.vision.v1p3beta1;

/**
 *
 *
 * 
 * A face annotation object contains the results of face detection.
 * 
* * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} */ public final class FaceAnnotation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) FaceAnnotationOrBuilder { private static final long serialVersionUID = 0L; // Use FaceAnnotation.newBuilder() to construct. private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; surpriseLikelihood_ = 0; underExposedLikelihood_ = 0; blurredLikelihood_ = 0; headwearLikelihood_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new FaceAnnotation(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); } public interface LandmarkOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) com.google.protobuf.MessageOrBuilder { /** * * *
     * Face landmark type.
     * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * * *
     * Face landmark type.
     * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The type. */ com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType(); /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return Whether the position field is set. */ boolean hasPosition(); /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return The position. */ com.google.cloud.vision.v1p3beta1.Position getPosition(); /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder(); } /** * * *
   * A face-specific landmark (for example, a face feature).
   * 
* * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} */ public static final class Landmark extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) LandmarkOrBuilder { private static final long serialVersionUID = 0L; // Use Landmark.newBuilder() to construct. private Landmark(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Landmark() { type_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Landmark(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); } /** * * *
     * Face landmark (feature) type.
     * Left and right are defined from the vantage of the viewer of the image
     * without considering mirror projections typical of photos. So, `LEFT_EYE`,
     * typically, is the person's right eye.
     * 
* * Protobuf enum {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * * *
       * Unknown face landmark detected. Should not be filled.
       * 
* * UNKNOWN_LANDMARK = 0; */ UNKNOWN_LANDMARK(0), /** * * *
       * Left eye.
       * 
* * LEFT_EYE = 1; */ LEFT_EYE(1), /** * * *
       * Right eye.
       * 
* * RIGHT_EYE = 2; */ RIGHT_EYE(2), /** * * *
       * Left of left eyebrow.
       * 
* * LEFT_OF_LEFT_EYEBROW = 3; */ LEFT_OF_LEFT_EYEBROW(3), /** * * *
       * Right of left eyebrow.
       * 
* * RIGHT_OF_LEFT_EYEBROW = 4; */ RIGHT_OF_LEFT_EYEBROW(4), /** * * *
       * Left of right eyebrow.
       * 
* * LEFT_OF_RIGHT_EYEBROW = 5; */ LEFT_OF_RIGHT_EYEBROW(5), /** * * *
       * Right of right eyebrow.
       * 
* * RIGHT_OF_RIGHT_EYEBROW = 6; */ RIGHT_OF_RIGHT_EYEBROW(6), /** * * *
       * Midpoint between eyes.
       * 
* * MIDPOINT_BETWEEN_EYES = 7; */ MIDPOINT_BETWEEN_EYES(7), /** * * *
       * Nose tip.
       * 
* * NOSE_TIP = 8; */ NOSE_TIP(8), /** * * *
       * Upper lip.
       * 
* * UPPER_LIP = 9; */ UPPER_LIP(9), /** * * *
       * Lower lip.
       * 
* * LOWER_LIP = 10; */ LOWER_LIP(10), /** * * *
       * Mouth left.
       * 
* * MOUTH_LEFT = 11; */ MOUTH_LEFT(11), /** * * *
       * Mouth right.
       * 
* * MOUTH_RIGHT = 12; */ MOUTH_RIGHT(12), /** * * *
       * Mouth center.
       * 
* * MOUTH_CENTER = 13; */ MOUTH_CENTER(13), /** * * *
       * Nose, bottom right.
       * 
* * NOSE_BOTTOM_RIGHT = 14; */ NOSE_BOTTOM_RIGHT(14), /** * * *
       * Nose, bottom left.
       * 
* * NOSE_BOTTOM_LEFT = 15; */ NOSE_BOTTOM_LEFT(15), /** * * *
       * Nose, bottom center.
       * 
* * NOSE_BOTTOM_CENTER = 16; */ NOSE_BOTTOM_CENTER(16), /** * * *
       * Left eye, top boundary.
       * 
* * LEFT_EYE_TOP_BOUNDARY = 17; */ LEFT_EYE_TOP_BOUNDARY(17), /** * * *
       * Left eye, right corner.
       * 
* * LEFT_EYE_RIGHT_CORNER = 18; */ LEFT_EYE_RIGHT_CORNER(18), /** * * *
       * Left eye, bottom boundary.
       * 
* * LEFT_EYE_BOTTOM_BOUNDARY = 19; */ LEFT_EYE_BOTTOM_BOUNDARY(19), /** * * *
       * Left eye, left corner.
       * 
* * LEFT_EYE_LEFT_CORNER = 20; */ LEFT_EYE_LEFT_CORNER(20), /** * * *
       * Right eye, top boundary.
       * 
* * RIGHT_EYE_TOP_BOUNDARY = 21; */ RIGHT_EYE_TOP_BOUNDARY(21), /** * * *
       * Right eye, right corner.
       * 
* * RIGHT_EYE_RIGHT_CORNER = 22; */ RIGHT_EYE_RIGHT_CORNER(22), /** * * *
       * Right eye, bottom boundary.
       * 
* * RIGHT_EYE_BOTTOM_BOUNDARY = 23; */ RIGHT_EYE_BOTTOM_BOUNDARY(23), /** * * *
       * Right eye, left corner.
       * 
* * RIGHT_EYE_LEFT_CORNER = 24; */ RIGHT_EYE_LEFT_CORNER(24), /** * * *
       * Left eyebrow, upper midpoint.
       * 
* * LEFT_EYEBROW_UPPER_MIDPOINT = 25; */ LEFT_EYEBROW_UPPER_MIDPOINT(25), /** * * *
       * Right eyebrow, upper midpoint.
       * 
* * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; */ RIGHT_EYEBROW_UPPER_MIDPOINT(26), /** * * *
       * Left ear tragion.
       * 
* * LEFT_EAR_TRAGION = 27; */ LEFT_EAR_TRAGION(27), /** * * *
       * Right ear tragion.
       * 
* * RIGHT_EAR_TRAGION = 28; */ RIGHT_EAR_TRAGION(28), /** * * *
       * Left eye pupil.
       * 
* * LEFT_EYE_PUPIL = 29; */ LEFT_EYE_PUPIL(29), /** * * *
       * Right eye pupil.
       * 
* * RIGHT_EYE_PUPIL = 30; */ RIGHT_EYE_PUPIL(30), /** * * *
       * Forehead glabella.
       * 
* * FOREHEAD_GLABELLA = 31; */ FOREHEAD_GLABELLA(31), /** * * *
       * Chin gnathion.
       * 
* * CHIN_GNATHION = 32; */ CHIN_GNATHION(32), /** * * *
       * Chin left gonion.
       * 
* * CHIN_LEFT_GONION = 33; */ CHIN_LEFT_GONION(33), /** * * *
       * Chin right gonion.
       * 
* * CHIN_RIGHT_GONION = 34; */ CHIN_RIGHT_GONION(34), UNRECOGNIZED(-1), ; /** * * *
       * Unknown face landmark detected. Should not be filled.
       * 
* * UNKNOWN_LANDMARK = 0; */ public static final int UNKNOWN_LANDMARK_VALUE = 0; /** * * *
       * Left eye.
       * 
* * LEFT_EYE = 1; */ public static final int LEFT_EYE_VALUE = 1; /** * * *
       * Right eye.
       * 
* * RIGHT_EYE = 2; */ public static final int RIGHT_EYE_VALUE = 2; /** * * *
       * Left of left eyebrow.
       * 
* * LEFT_OF_LEFT_EYEBROW = 3; */ public static final int LEFT_OF_LEFT_EYEBROW_VALUE = 3; /** * * *
       * Right of left eyebrow.
       * 
* * RIGHT_OF_LEFT_EYEBROW = 4; */ public static final int RIGHT_OF_LEFT_EYEBROW_VALUE = 4; /** * * *
       * Left of right eyebrow.
       * 
* * LEFT_OF_RIGHT_EYEBROW = 5; */ public static final int LEFT_OF_RIGHT_EYEBROW_VALUE = 5; /** * * *
       * Right of right eyebrow.
       * 
* * RIGHT_OF_RIGHT_EYEBROW = 6; */ public static final int RIGHT_OF_RIGHT_EYEBROW_VALUE = 6; /** * * *
       * Midpoint between eyes.
       * 
* * MIDPOINT_BETWEEN_EYES = 7; */ public static final int MIDPOINT_BETWEEN_EYES_VALUE = 7; /** * * *
       * Nose tip.
       * 
* * NOSE_TIP = 8; */ public static final int NOSE_TIP_VALUE = 8; /** * * *
       * Upper lip.
       * 
* * UPPER_LIP = 9; */ public static final int UPPER_LIP_VALUE = 9; /** * * *
       * Lower lip.
       * 
* * LOWER_LIP = 10; */ public static final int LOWER_LIP_VALUE = 10; /** * * *
       * Mouth left.
       * 
* * MOUTH_LEFT = 11; */ public static final int MOUTH_LEFT_VALUE = 11; /** * * *
       * Mouth right.
       * 
* * MOUTH_RIGHT = 12; */ public static final int MOUTH_RIGHT_VALUE = 12; /** * * *
       * Mouth center.
       * 
* * MOUTH_CENTER = 13; */ public static final int MOUTH_CENTER_VALUE = 13; /** * * *
       * Nose, bottom right.
       * 
* * NOSE_BOTTOM_RIGHT = 14; */ public static final int NOSE_BOTTOM_RIGHT_VALUE = 14; /** * * *
       * Nose, bottom left.
       * 
* * NOSE_BOTTOM_LEFT = 15; */ public static final int NOSE_BOTTOM_LEFT_VALUE = 15; /** * * *
       * Nose, bottom center.
       * 
* * NOSE_BOTTOM_CENTER = 16; */ public static final int NOSE_BOTTOM_CENTER_VALUE = 16; /** * * *
       * Left eye, top boundary.
       * 
* * LEFT_EYE_TOP_BOUNDARY = 17; */ public static final int LEFT_EYE_TOP_BOUNDARY_VALUE = 17; /** * * *
       * Left eye, right corner.
       * 
* * LEFT_EYE_RIGHT_CORNER = 18; */ public static final int LEFT_EYE_RIGHT_CORNER_VALUE = 18; /** * * *
       * Left eye, bottom boundary.
       * 
* * LEFT_EYE_BOTTOM_BOUNDARY = 19; */ public static final int LEFT_EYE_BOTTOM_BOUNDARY_VALUE = 19; /** * * *
       * Left eye, left corner.
       * 
* * LEFT_EYE_LEFT_CORNER = 20; */ public static final int LEFT_EYE_LEFT_CORNER_VALUE = 20; /** * * *
       * Right eye, top boundary.
       * 
* * RIGHT_EYE_TOP_BOUNDARY = 21; */ public static final int RIGHT_EYE_TOP_BOUNDARY_VALUE = 21; /** * * *
       * Right eye, right corner.
       * 
* * RIGHT_EYE_RIGHT_CORNER = 22; */ public static final int RIGHT_EYE_RIGHT_CORNER_VALUE = 22; /** * * *
       * Right eye, bottom boundary.
       * 
* * RIGHT_EYE_BOTTOM_BOUNDARY = 23; */ public static final int RIGHT_EYE_BOTTOM_BOUNDARY_VALUE = 23; /** * * *
       * Right eye, left corner.
       * 
* * RIGHT_EYE_LEFT_CORNER = 24; */ public static final int RIGHT_EYE_LEFT_CORNER_VALUE = 24; /** * * *
       * Left eyebrow, upper midpoint.
       * 
* * LEFT_EYEBROW_UPPER_MIDPOINT = 25; */ public static final int LEFT_EYEBROW_UPPER_MIDPOINT_VALUE = 25; /** * * *
       * Right eyebrow, upper midpoint.
       * 
* * RIGHT_EYEBROW_UPPER_MIDPOINT = 26; */ public static final int RIGHT_EYEBROW_UPPER_MIDPOINT_VALUE = 26; /** * * *
       * Left ear tragion.
       * 
* * LEFT_EAR_TRAGION = 27; */ public static final int LEFT_EAR_TRAGION_VALUE = 27; /** * * *
       * Right ear tragion.
       * 
* * RIGHT_EAR_TRAGION = 28; */ public static final int RIGHT_EAR_TRAGION_VALUE = 28; /** * * *
       * Left eye pupil.
       * 
* * LEFT_EYE_PUPIL = 29; */ public static final int LEFT_EYE_PUPIL_VALUE = 29; /** * * *
       * Right eye pupil.
       * 
* * RIGHT_EYE_PUPIL = 30; */ public static final int RIGHT_EYE_PUPIL_VALUE = 30; /** * * *
       * Forehead glabella.
       * 
* * FOREHEAD_GLABELLA = 31; */ public static final int FOREHEAD_GLABELLA_VALUE = 31; /** * * *
       * Chin gnathion.
       * 
* * CHIN_GNATHION = 32; */ public static final int CHIN_GNATHION_VALUE = 32; /** * * *
       * Chin left gonion.
       * 
* * CHIN_LEFT_GONION = 33; */ public static final int CHIN_LEFT_GONION_VALUE = 33; /** * * *
       * Chin right gonion.
       * 
* * CHIN_RIGHT_GONION = 34; */ public static final int CHIN_RIGHT_GONION_VALUE = 34; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Type forNumber(int value) { switch (value) { case 0: return UNKNOWN_LANDMARK; case 1: return LEFT_EYE; case 2: return RIGHT_EYE; case 3: return LEFT_OF_LEFT_EYEBROW; case 4: return RIGHT_OF_LEFT_EYEBROW; case 5: return LEFT_OF_RIGHT_EYEBROW; case 6: return RIGHT_OF_RIGHT_EYEBROW; case 7: return MIDPOINT_BETWEEN_EYES; case 8: return NOSE_TIP; case 9: return UPPER_LIP; case 10: return LOWER_LIP; case 11: return MOUTH_LEFT; case 12: return MOUTH_RIGHT; case 13: return MOUTH_CENTER; case 14: return NOSE_BOTTOM_RIGHT; case 15: return NOSE_BOTTOM_LEFT; case 16: return NOSE_BOTTOM_CENTER; case 17: return LEFT_EYE_TOP_BOUNDARY; case 18: return LEFT_EYE_RIGHT_CORNER; case 19: return LEFT_EYE_BOTTOM_BOUNDARY; case 20: return LEFT_EYE_LEFT_CORNER; case 21: return RIGHT_EYE_TOP_BOUNDARY; case 22: return RIGHT_EYE_RIGHT_CORNER; case 23: return RIGHT_EYE_BOTTOM_BOUNDARY; case 24: return RIGHT_EYE_LEFT_CORNER; case 25: return LEFT_EYEBROW_UPPER_MIDPOINT; case 26: return RIGHT_EYEBROW_UPPER_MIDPOINT; case 27: return LEFT_EAR_TRAGION; case 28: return RIGHT_EAR_TRAGION; case 29: return LEFT_EYE_PUPIL; case 30: return RIGHT_EYE_PUPIL; case 31: return FOREHEAD_GLABELLA; case 32: return CHIN_GNATHION; case 33: return CHIN_LEFT_GONION; case 34: return CHIN_RIGHT_GONION; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDescriptor() .getEnumTypes() .get(0); } private static final Type[] VALUES = values(); public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type) } private int bitField0_; public static final int TYPE_FIELD_NUMBER = 3; private int type_ = 0; /** * * *
     * Face landmark type.
     * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
     * Face landmark type.
     * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The type. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.forNumber(type_); return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; } public static final int POSITION_FIELD_NUMBER = 4; private com.google.cloud.vision.v1p3beta1.Position position_; /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return Whether the position field is set. */ @java.lang.Override public boolean hasPosition() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return The position. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Position getPosition() { return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; } /** * * *
     * Face landmark position.
     * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK .getNumber()) { output.writeEnum(3, type_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getPosition()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (type_ != com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNKNOWN_LANDMARK .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPosition()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)) { return super.equals(obj); } com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) obj; if (type_ != other.type_) return false; if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { if (!getPosition().equals(other.getPosition())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (hasPosition()) { hash = (37 * hash) + POSITION_FIELD_NUMBER; hash = (53 * hash) + getPosition().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * A face-specific landmark (for example, a face feature).
     * 
* * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder.class); } // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getPositionFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; type_ = 0; position_ = null; if (positionBuilder_ != null) { positionBuilder_.dispose(); positionBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_Landmark_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { return com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark build() { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark buildPartial() { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.type_ = type_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.position_ = positionBuilder_ == null ? position_ : positionBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) { return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other) { if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()) return this; if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.hasPosition()) { mergePosition(other.getPosition()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 24: { type_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 24 case 34: { input.readMessage(getPositionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int type_ = 0; /** * * *
       * Face landmark type.
       * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
       * Face landmark type.
       * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Face landmark type.
       * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return The type. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type getType() { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type result = com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.forNumber(type_); return result == null ? com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type.UNRECOGNIZED : result; } /** * * *
       * Face landmark type.
       * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Face landmark type.
       * 
* * .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type type = 3; * * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = 0; onChanged(); return this; } private com.google.cloud.vision.v1p3beta1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> positionBuilder_; /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return Whether the position field is set. */ public boolean hasPosition() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; * * @return The position. */ public com.google.cloud.vision.v1p3beta1.Position getPosition() { if (positionBuilder_ == null) { return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; } else { return positionBuilder_.getMessage(); } } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public Builder setPosition(com.google.cloud.vision.v1p3beta1.Position value) { if (positionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } position_ = value; } else { positionBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public Builder setPosition( com.google.cloud.vision.v1p3beta1.Position.Builder builderForValue) { if (positionBuilder_ == null) { position_ = builderForValue.build(); } else { positionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public Builder mergePosition(com.google.cloud.vision.v1p3beta1.Position value) { if (positionBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && position_ != null && position_ != com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance()) { getPositionBuilder().mergeFrom(value); } else { position_ = value; } } else { positionBuilder_.mergeFrom(value); } if (position_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public Builder clearPosition() { bitField0_ = (bitField0_ & ~0x00000002); position_ = null; if (positionBuilder_ != null) { positionBuilder_.dispose(); positionBuilder_ = null; } onChanged(); return this; } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public com.google.cloud.vision.v1p3beta1.Position.Builder getPositionBuilder() { bitField0_ |= 0x00000002; onChanged(); return getPositionFieldBuilder().getBuilder(); } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder() { if (positionBuilder_ != null) { return positionBuilder_.getMessageOrBuilder(); } else { return position_ == null ? com.google.cloud.vision.v1p3beta1.Position.getDefaultInstance() : position_; } } /** * * *
       * Face landmark position.
       * 
* * .google.cloud.vision.v1p3beta1.Position position = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder> getPositionFieldBuilder() { if (positionBuilder_ == null) { positionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, com.google.cloud.vision.v1p3beta1.PositionOrBuilder>( getPosition(), getParentForChildren(), isClean()); position_ = null; } return positionBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark(); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Landmark parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int BOUNDING_POLY_FIELD_NUMBER = 1; private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; /** * * *
   * The bounding polygon around the face. The coordinates of the bounding box
   * are in the original image's scale, as returned in `ImageParams`.
   * The bounding box is computed to "frame" the face in accordance with human
   * expectations. It is based on the landmarker results.
   * Note that one or more x and/or y coordinates may not be generated in the
   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
   * appears in the image to be annotated.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; * * @return Whether the boundingPoly field is set. */ @java.lang.Override public boolean hasBoundingPoly() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * The bounding polygon around the face. The coordinates of the bounding box
   * are in the original image's scale, as returned in `ImageParams`.
   * The bounding box is computed to "frame" the face in accordance with human
   * expectations. It is based on the landmarker results.
   * Note that one or more x and/or y coordinates may not be generated in the
   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
   * appears in the image to be annotated.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; * * @return The boundingPoly. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; } /** * * *
   * The bounding polygon around the face. The coordinates of the bounding box
   * are in the original image's scale, as returned in `ImageParams`.
   * The bounding box is computed to "frame" the face in accordance with human
   * expectations. It is based on the landmarker results.
   * Note that one or more x and/or y coordinates may not be generated in the
   * `BoundingPoly` (the polygon will be unbounded) if only a partial face
   * appears in the image to be annotated.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; } public static final int FD_BOUNDING_POLY_FIELD_NUMBER = 2; private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; /** * * *
   * The `fd_bounding_poly` bounding polygon is tighter than the
   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
   * is used to eliminate the face from any image analysis that detects the
   * "amount of skin" visible in an image. It is not based on the
   * landmarker results, only on the initial face detection, hence
   * the <code>fd</code> (face detection) prefix.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; * * @return Whether the fdBoundingPoly field is set. */ @java.lang.Override public boolean hasFdBoundingPoly() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * The `fd_bounding_poly` bounding polygon is tighter than the
   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
   * is used to eliminate the face from any image analysis that detects the
   * "amount of skin" visible in an image. It is not based on the
   * landmarker results, only on the initial face detection, hence
   * the <code>fd</code> (face detection) prefix.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; * * @return The fdBoundingPoly. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; } /** * * *
   * The `fd_bounding_poly` bounding polygon is tighter than the
   * `boundingPoly`, and encloses only the skin part of the face. Typically, it
   * is used to eliminate the face from any image analysis that detects the
   * "amount of skin" visible in an image. It is not based on the
   * landmarker results, only on the initial face detection, hence
   * the <code>fd</code> (face detection) prefix.
   * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; } public static final int LANDMARKS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List landmarks_; /** * * *
   * Detected face landmarks.
   * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ @java.lang.Override public java.util.List getLandmarksList() { return landmarks_; } /** * * *
   * Detected face landmarks.
   * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ @java.lang.Override public java.util.List< ? extends com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList() { return landmarks_; } /** * * *
   * Detected face landmarks.
   * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ @java.lang.Override public int getLandmarksCount() { return landmarks_.size(); } /** * * *
   * Detected face landmarks.
   * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { return landmarks_.get(index); } /** * * *
   * Detected face landmarks.
   * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( int index) { return landmarks_.get(index); } public static final int ROLL_ANGLE_FIELD_NUMBER = 4; private float rollAngle_ = 0F; /** * * *
   * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
   * of the face relative to the image vertical about the axis perpendicular to
   * the face. Range [-180,180].
   * 
* * float roll_angle = 4; * * @return The rollAngle. */ @java.lang.Override public float getRollAngle() { return rollAngle_; } public static final int PAN_ANGLE_FIELD_NUMBER = 5; private float panAngle_ = 0F; /** * * *
   * Yaw angle, which indicates the leftward/rightward angle that the face is
   * pointing relative to the vertical plane perpendicular to the image. Range
   * [-180,180].
   * 
* * float pan_angle = 5; * * @return The panAngle. */ @java.lang.Override public float getPanAngle() { return panAngle_; } public static final int TILT_ANGLE_FIELD_NUMBER = 6; private float tiltAngle_ = 0F; /** * * *
   * Pitch angle, which indicates the upwards/downwards angle that the face is
   * pointing relative to the image's horizontal plane. Range [-180,180].
   * 
* * float tilt_angle = 6; * * @return The tiltAngle. */ @java.lang.Override public float getTiltAngle() { return tiltAngle_; } public static final int DETECTION_CONFIDENCE_FIELD_NUMBER = 7; private float detectionConfidence_ = 0F; /** * * *
   * Detection confidence. Range [0, 1].
   * 
* * float detection_confidence = 7; * * @return The detectionConfidence. */ @java.lang.Override public float getDetectionConfidence() { return detectionConfidence_; } public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER = 8; private float landmarkingConfidence_ = 0F; /** * * *
   * Face landmarking confidence. Range [0, 1].
   * 
* * float landmarking_confidence = 8; * * @return The landmarkingConfidence. */ @java.lang.Override public float getLandmarkingConfidence() { return landmarkingConfidence_; } public static final int JOY_LIKELIHOOD_FIELD_NUMBER = 9; private int joyLikelihood_ = 0; /** * * *
   * Joy likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @return The enum numeric value on the wire for joyLikelihood. */ @java.lang.Override public int getJoyLikelihoodValue() { return joyLikelihood_; } /** * * *
   * Joy likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @return The joyLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(joyLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int SORROW_LIKELIHOOD_FIELD_NUMBER = 10; private int sorrowLikelihood_ = 0; /** * * *
   * Sorrow likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @return The enum numeric value on the wire for sorrowLikelihood. */ @java.lang.Override public int getSorrowLikelihoodValue() { return sorrowLikelihood_; } /** * * *
   * Sorrow likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @return The sorrowLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(sorrowLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int ANGER_LIKELIHOOD_FIELD_NUMBER = 11; private int angerLikelihood_ = 0; /** * * *
   * Anger likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @return The enum numeric value on the wire for angerLikelihood. */ @java.lang.Override public int getAngerLikelihoodValue() { return angerLikelihood_; } /** * * *
   * Anger likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @return The angerLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(angerLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER = 12; private int surpriseLikelihood_ = 0; /** * * *
   * Surprise likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @return The enum numeric value on the wire for surpriseLikelihood. */ @java.lang.Override public int getSurpriseLikelihoodValue() { return surpriseLikelihood_; } /** * * *
   * Surprise likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @return The surpriseLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(surpriseLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER = 13; private int underExposedLikelihood_ = 0; /** * * *
   * Under-exposed likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @return The enum numeric value on the wire for underExposedLikelihood. */ @java.lang.Override public int getUnderExposedLikelihoodValue() { return underExposedLikelihood_; } /** * * *
   * Under-exposed likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @return The underExposedLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(underExposedLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER = 14; private int blurredLikelihood_ = 0; /** * * *
   * Blurred likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @return The enum numeric value on the wire for blurredLikelihood. */ @java.lang.Override public int getBlurredLikelihoodValue() { return blurredLikelihood_; } /** * * *
   * Blurred likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @return The blurredLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(blurredLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER = 15; private int headwearLikelihood_ = 0; /** * * *
   * Headwear likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @return The enum numeric value on the wire for headwearLikelihood. */ @java.lang.Override public int getHeadwearLikelihoodValue() { return headwearLikelihood_; } /** * * *
   * Headwear likelihood.
   * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @return The headwearLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(headwearLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getBoundingPoly()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getFdBoundingPoly()); } for (int i = 0; i < landmarks_.size(); i++) { output.writeMessage(3, landmarks_.get(i)); } if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { output.writeFloat(4, rollAngle_); } if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { output.writeFloat(5, panAngle_); } if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { output.writeFloat(6, tiltAngle_); } if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { output.writeFloat(7, detectionConfidence_); } if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { output.writeFloat(8, landmarkingConfidence_); } if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(9, joyLikelihood_); } if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(10, sorrowLikelihood_); } if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(11, angerLikelihood_); } if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(12, surpriseLikelihood_); } if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(13, underExposedLikelihood_); } if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(14, blurredLikelihood_); } if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { output.writeEnum(15, headwearLikelihood_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBoundingPoly()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFdBoundingPoly()); } for (int i = 0; i < landmarks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, landmarks_.get(i)); } if (java.lang.Float.floatToRawIntBits(rollAngle_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, rollAngle_); } if (java.lang.Float.floatToRawIntBits(panAngle_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, panAngle_); } if (java.lang.Float.floatToRawIntBits(tiltAngle_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, tiltAngle_); } if (java.lang.Float.floatToRawIntBits(detectionConfidence_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, detectionConfidence_); } if (java.lang.Float.floatToRawIntBits(landmarkingConfidence_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, landmarkingConfidence_); } if (joyLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, joyLikelihood_); } if (sorrowLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, sorrowLikelihood_); } if (angerLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, angerLikelihood_); } if (surpriseLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, surpriseLikelihood_); } if (underExposedLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, underExposedLikelihood_); } if (blurredLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, blurredLikelihood_); } if (headwearLikelihood_ != com.google.cloud.vision.v1p3beta1.Likelihood.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, headwearLikelihood_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation)) { return super.equals(obj); } com.google.cloud.vision.v1p3beta1.FaceAnnotation other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) obj; if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; } if (!getLandmarksList().equals(other.getLandmarksList())) return false; if (java.lang.Float.floatToIntBits(getRollAngle()) != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; if (java.lang.Float.floatToIntBits(getPanAngle()) != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; if (java.lang.Float.floatToIntBits(getTiltAngle()) != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; if (java.lang.Float.floatToIntBits(getDetectionConfidence()) != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; if (joyLikelihood_ != other.joyLikelihood_) return false; if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; if (angerLikelihood_ != other.angerLikelihood_) return false; if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; if (blurredLikelihood_ != other.blurredLikelihood_) return false; if (headwearLikelihood_ != other.headwearLikelihood_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasBoundingPoly()) { hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; hash = (53 * hash) + getBoundingPoly().hashCode(); } if (hasFdBoundingPoly()) { hash = (37 * hash) + FD_BOUNDING_POLY_FIELD_NUMBER; hash = (53 * hash) + getFdBoundingPoly().hashCode(); } if (getLandmarksCount() > 0) { hash = (37 * hash) + LANDMARKS_FIELD_NUMBER; hash = (53 * hash) + getLandmarksList().hashCode(); } hash = (37 * hash) + ROLL_ANGLE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getRollAngle()); hash = (37 * hash) + PAN_ANGLE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getPanAngle()); hash = (37 * hash) + TILT_ANGLE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getTiltAngle()); hash = (37 * hash) + DETECTION_CONFIDENCE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getDetectionConfidence()); hash = (37 * hash) + LANDMARKING_CONFIDENCE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getLandmarkingConfidence()); hash = (37 * hash) + JOY_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + joyLikelihood_; hash = (37 * hash) + SORROW_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + sorrowLikelihood_; hash = (37 * hash) + ANGER_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + angerLikelihood_; hash = (37 * hash) + SURPRISE_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + surpriseLikelihood_; hash = (37 * hash) + UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + underExposedLikelihood_; hash = (37 * hash) + BLURRED_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + blurredLikelihood_; hash = (37 * hash) + HEADWEAR_LIKELIHOOD_FIELD_NUMBER; hash = (53 * hash) + headwearLikelihood_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.FaceAnnotation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * A face annotation object contains the results of face detection.
   * 
* * Protobuf type {@code google.cloud.vision.v1p3beta1.FaceAnnotation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.FaceAnnotation) com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p3beta1.FaceAnnotation.class, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder.class); } // Construct using com.google.cloud.vision.v1p3beta1.FaceAnnotation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getBoundingPolyFieldBuilder(); getFdBoundingPolyFieldBuilder(); getLandmarksFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; boundingPoly_ = null; if (boundingPolyBuilder_ != null) { boundingPolyBuilder_.dispose(); boundingPolyBuilder_ = null; } fdBoundingPoly_ = null; if (fdBoundingPolyBuilder_ != null) { fdBoundingPolyBuilder_.dispose(); fdBoundingPolyBuilder_ = null; } if (landmarksBuilder_ == null) { landmarks_ = java.util.Collections.emptyList(); } else { landmarks_ = null; landmarksBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); rollAngle_ = 0F; panAngle_ = 0F; tiltAngle_ = 0F; detectionConfidence_ = 0F; landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; surpriseLikelihood_ = 0; underExposedLikelihood_ = 0; blurredLikelihood_ = 0; headwearLikelihood_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p3beta1_FaceAnnotation_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { return com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation build() { com.google.cloud.vision.v1p3beta1.FaceAnnotation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation buildPartial() { com.google.cloud.vision.v1p3beta1.FaceAnnotation result = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.vision.v1p3beta1.FaceAnnotation result) { if (landmarksBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } result.landmarks_ = landmarks_; } else { result.landmarks_ = landmarksBuilder_.build(); } } private void buildPartial0(com.google.cloud.vision.v1p3beta1.FaceAnnotation result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.boundingPoly_ = boundingPolyBuilder_ == null ? boundingPoly_ : boundingPolyBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.fdBoundingPoly_ = fdBoundingPolyBuilder_ == null ? fdBoundingPoly_ : fdBoundingPolyBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.rollAngle_ = rollAngle_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.panAngle_ = panAngle_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.tiltAngle_ = tiltAngle_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.detectionConfidence_ = detectionConfidence_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.landmarkingConfidence_ = landmarkingConfidence_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.joyLikelihood_ = joyLikelihood_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.sorrowLikelihood_ = sorrowLikelihood_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.angerLikelihood_ = angerLikelihood_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.surpriseLikelihood_ = surpriseLikelihood_; } if (((from_bitField0_ & 0x00001000) != 0)) { result.underExposedLikelihood_ = underExposedLikelihood_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.blurredLikelihood_ = blurredLikelihood_; } if (((from_bitField0_ & 0x00004000) != 0)) { result.headwearLikelihood_ = headwearLikelihood_; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p3beta1.FaceAnnotation) { return mergeFrom((com.google.cloud.vision.v1p3beta1.FaceAnnotation) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.FaceAnnotation other) { if (other == com.google.cloud.vision.v1p3beta1.FaceAnnotation.getDefaultInstance()) return this; if (other.hasBoundingPoly()) { mergeBoundingPoly(other.getBoundingPoly()); } if (other.hasFdBoundingPoly()) { mergeFdBoundingPoly(other.getFdBoundingPoly()); } if (landmarksBuilder_ == null) { if (!other.landmarks_.isEmpty()) { if (landmarks_.isEmpty()) { landmarks_ = other.landmarks_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLandmarksIsMutable(); landmarks_.addAll(other.landmarks_); } onChanged(); } } else { if (!other.landmarks_.isEmpty()) { if (landmarksBuilder_.isEmpty()) { landmarksBuilder_.dispose(); landmarksBuilder_ = null; landmarks_ = other.landmarks_; bitField0_ = (bitField0_ & ~0x00000004); landmarksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLandmarksFieldBuilder() : null; } else { landmarksBuilder_.addAllMessages(other.landmarks_); } } } if (other.getRollAngle() != 0F) { setRollAngle(other.getRollAngle()); } if (other.getPanAngle() != 0F) { setPanAngle(other.getPanAngle()); } if (other.getTiltAngle() != 0F) { setTiltAngle(other.getTiltAngle()); } if (other.getDetectionConfidence() != 0F) { setDetectionConfidence(other.getDetectionConfidence()); } if (other.getLandmarkingConfidence() != 0F) { setLandmarkingConfidence(other.getLandmarkingConfidence()); } if (other.joyLikelihood_ != 0) { setJoyLikelihoodValue(other.getJoyLikelihoodValue()); } if (other.sorrowLikelihood_ != 0) { setSorrowLikelihoodValue(other.getSorrowLikelihoodValue()); } if (other.angerLikelihood_ != 0) { setAngerLikelihoodValue(other.getAngerLikelihoodValue()); } if (other.surpriseLikelihood_ != 0) { setSurpriseLikelihoodValue(other.getSurpriseLikelihoodValue()); } if (other.underExposedLikelihood_ != 0) { setUnderExposedLikelihoodValue(other.getUnderExposedLikelihoodValue()); } if (other.blurredLikelihood_ != 0) { setBlurredLikelihoodValue(other.getBlurredLikelihoodValue()); } if (other.headwearLikelihood_ != 0) { setHeadwearLikelihoodValue(other.getHeadwearLikelihoodValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getBoundingPolyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage(getFdBoundingPolyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark m = input.readMessage( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.parser(), extensionRegistry); if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); landmarks_.add(m); } else { landmarksBuilder_.addMessage(m); } break; } // case 26 case 37: { rollAngle_ = input.readFloat(); bitField0_ |= 0x00000008; break; } // case 37 case 45: { panAngle_ = input.readFloat(); bitField0_ |= 0x00000010; break; } // case 45 case 53: { tiltAngle_ = input.readFloat(); bitField0_ |= 0x00000020; break; } // case 53 case 61: { detectionConfidence_ = input.readFloat(); bitField0_ |= 0x00000040; break; } // case 61 case 69: { landmarkingConfidence_ = input.readFloat(); bitField0_ |= 0x00000080; break; } // case 69 case 72: { joyLikelihood_ = input.readEnum(); bitField0_ |= 0x00000100; break; } // case 72 case 80: { sorrowLikelihood_ = input.readEnum(); bitField0_ |= 0x00000200; break; } // case 80 case 88: { angerLikelihood_ = input.readEnum(); bitField0_ |= 0x00000400; break; } // case 88 case 96: { surpriseLikelihood_ = input.readEnum(); bitField0_ |= 0x00000800; break; } // case 96 case 104: { underExposedLikelihood_ = input.readEnum(); bitField0_ |= 0x00001000; break; } // case 104 case 112: { blurredLikelihood_ = input.readEnum(); bitField0_ |= 0x00002000; break; } // case 112 case 120: { headwearLikelihood_ = input.readEnum(); bitField0_ |= 0x00004000; break; } // case 120 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> boundingPolyBuilder_; /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; * * @return Whether the boundingPoly field is set. */ public boolean hasBoundingPoly() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; * * @return The boundingPoly. */ public com.google.cloud.vision.v1p3beta1.BoundingPoly getBoundingPoly() { if (boundingPolyBuilder_ == null) { return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; } else { return boundingPolyBuilder_.getMessage(); } } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public Builder setBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { if (boundingPolyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } boundingPoly_ = value; } else { boundingPolyBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public Builder setBoundingPoly( com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { if (boundingPolyBuilder_ == null) { boundingPoly_ = builderForValue.build(); } else { boundingPolyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public Builder mergeBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { if (boundingPolyBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && boundingPoly_ != null && boundingPoly_ != com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()) { getBoundingPolyBuilder().mergeFrom(value); } else { boundingPoly_ = value; } } else { boundingPolyBuilder_.mergeFrom(value); } if (boundingPoly_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public Builder clearBoundingPoly() { bitField0_ = (bitField0_ & ~0x00000001); boundingPoly_ = null; if (boundingPolyBuilder_ != null) { boundingPolyBuilder_.dispose(); boundingPolyBuilder_ = null; } onChanged(); return this; } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getBoundingPolyBuilder() { bitField0_ |= 0x00000001; onChanged(); return getBoundingPolyFieldBuilder().getBuilder(); } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { if (boundingPolyBuilder_ != null) { return boundingPolyBuilder_.getMessageOrBuilder(); } else { return boundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : boundingPoly_; } } /** * * *
     * The bounding polygon around the face. The coordinates of the bounding box
     * are in the original image's scale, as returned in `ImageParams`.
     * The bounding box is computed to "frame" the face in accordance with human
     * expectations. It is based on the landmarker results.
     * Note that one or more x and/or y coordinates may not be generated in the
     * `BoundingPoly` (the polygon will be unbounded) if only a partial face
     * appears in the image to be annotated.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly bounding_poly = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> getBoundingPolyFieldBuilder() { if (boundingPolyBuilder_ == null) { boundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( getBoundingPoly(), getParentForChildren(), isClean()); boundingPoly_ = null; } return boundingPolyBuilder_; } private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> fdBoundingPolyBuilder_; /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; * * @return Whether the fdBoundingPoly field is set. */ public boolean hasFdBoundingPoly() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; * * @return The fdBoundingPoly. */ public com.google.cloud.vision.v1p3beta1.BoundingPoly getFdBoundingPoly() { if (fdBoundingPolyBuilder_ == null) { return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; } else { return fdBoundingPolyBuilder_.getMessage(); } } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public Builder setFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { if (fdBoundingPolyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fdBoundingPoly_ = value; } else { fdBoundingPolyBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public Builder setFdBoundingPoly( com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder builderForValue) { if (fdBoundingPolyBuilder_ == null) { fdBoundingPoly_ = builderForValue.build(); } else { fdBoundingPolyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public Builder mergeFdBoundingPoly(com.google.cloud.vision.v1p3beta1.BoundingPoly value) { if (fdBoundingPolyBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && fdBoundingPoly_ != null && fdBoundingPoly_ != com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance()) { getFdBoundingPolyBuilder().mergeFrom(value); } else { fdBoundingPoly_ = value; } } else { fdBoundingPolyBuilder_.mergeFrom(value); } if (fdBoundingPoly_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public Builder clearFdBoundingPoly() { bitField0_ = (bitField0_ & ~0x00000002); fdBoundingPoly_ = null; if (fdBoundingPolyBuilder_ != null) { fdBoundingPolyBuilder_.dispose(); fdBoundingPolyBuilder_ = null; } onChanged(); return this; } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder getFdBoundingPolyBuilder() { bitField0_ |= 0x00000002; onChanged(); return getFdBoundingPolyFieldBuilder().getBuilder(); } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPolyOrBuilder() { if (fdBoundingPolyBuilder_ != null) { return fdBoundingPolyBuilder_.getMessageOrBuilder(); } else { return fdBoundingPoly_ == null ? com.google.cloud.vision.v1p3beta1.BoundingPoly.getDefaultInstance() : fdBoundingPoly_; } } /** * * *
     * The `fd_bounding_poly` bounding polygon is tighter than the
     * `boundingPoly`, and encloses only the skin part of the face. Typically, it
     * is used to eliminate the face from any image analysis that detects the
     * "amount of skin" visible in an image. It is not based on the
     * landmarker results, only on the initial face detection, hence
     * the <code>fd</code> (face detection) prefix.
     * 
* * .google.cloud.vision.v1p3beta1.BoundingPoly fd_bounding_poly = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder> getFdBoundingPolyFieldBuilder() { if (fdBoundingPolyBuilder_ == null) { fdBoundingPolyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( getFdBoundingPoly(), getParentForChildren(), isClean()); fdBoundingPoly_ = null; } return fdBoundingPolyBuilder_; } private java.util.List landmarks_ = java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList( landmarks_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> landmarksBuilder_; /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public java.util.List getLandmarksList() { if (landmarksBuilder_ == null) { return java.util.Collections.unmodifiableList(landmarks_); } else { return landmarksBuilder_.getMessageList(); } } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public int getLandmarksCount() { if (landmarksBuilder_ == null) { return landmarks_.size(); } else { return landmarksBuilder_.getCount(); } } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark getLandmarks(int index) { if (landmarksBuilder_ == null) { return landmarks_.get(index); } else { return landmarksBuilder_.getMessage(index); } } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder setLandmarks( int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { if (landmarksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarksIsMutable(); landmarks_.set(index, value); onChanged(); } else { landmarksBuilder_.setMessage(index, value); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder setLandmarks( int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); landmarks_.set(index, builderForValue.build()); onChanged(); } else { landmarksBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder addLandmarks(com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { if (landmarksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarksIsMutable(); landmarks_.add(value); onChanged(); } else { landmarksBuilder_.addMessage(value); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder addLandmarks( int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark value) { if (landmarksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarksIsMutable(); landmarks_.add(index, value); onChanged(); } else { landmarksBuilder_.addMessage(index, value); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder addLandmarks( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); landmarks_.add(builderForValue.build()); onChanged(); } else { landmarksBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder addLandmarks( int index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder builderForValue) { if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); landmarks_.add(index, builderForValue.build()); onChanged(); } else { landmarksBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder addAllLandmarks( java.lang.Iterable values) { if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarks_); onChanged(); } else { landmarksBuilder_.addAllMessages(values); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder clearLandmarks() { if (landmarksBuilder_ == null) { landmarks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { landmarksBuilder_.clear(); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public Builder removeLandmarks(int index) { if (landmarksBuilder_ == null) { ensureLandmarksIsMutable(); landmarks_.remove(index); onChanged(); } else { landmarksBuilder_.remove(index); } return this; } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder getLandmarksBuilder( int index) { return getLandmarksFieldBuilder().getBuilder(index); } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder( int index) { if (landmarksBuilder_ == null) { return landmarks_.get(index); } else { return landmarksBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public java.util.List< ? extends com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList() { if (landmarksBuilder_ != null) { return landmarksBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(landmarks_); } } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder() { return getLandmarksFieldBuilder() .addBuilder( com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLandmarksBuilder( int index) { return getLandmarksFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.getDefaultInstance()); } /** * * *
     * Detected face landmarks.
     * 
* * repeated .google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark landmarks = 3; */ public java.util.List getLandmarksBuilderList() { return getLandmarksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder> getLandmarksFieldBuilder() { if (landmarksBuilder_ == null) { landmarksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder>( landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; } private float rollAngle_; /** * * *
     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
     * of the face relative to the image vertical about the axis perpendicular to
     * the face. Range [-180,180].
     * 
* * float roll_angle = 4; * * @return The rollAngle. */ @java.lang.Override public float getRollAngle() { return rollAngle_; } /** * * *
     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
     * of the face relative to the image vertical about the axis perpendicular to
     * the face. Range [-180,180].
     * 
* * float roll_angle = 4; * * @param value The rollAngle to set. * @return This builder for chaining. */ public Builder setRollAngle(float value) { rollAngle_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
     * of the face relative to the image vertical about the axis perpendicular to
     * the face. Range [-180,180].
     * 
* * float roll_angle = 4; * * @return This builder for chaining. */ public Builder clearRollAngle() { bitField0_ = (bitField0_ & ~0x00000008); rollAngle_ = 0F; onChanged(); return this; } private float panAngle_; /** * * *
     * Yaw angle, which indicates the leftward/rightward angle that the face is
     * pointing relative to the vertical plane perpendicular to the image. Range
     * [-180,180].
     * 
* * float pan_angle = 5; * * @return The panAngle. */ @java.lang.Override public float getPanAngle() { return panAngle_; } /** * * *
     * Yaw angle, which indicates the leftward/rightward angle that the face is
     * pointing relative to the vertical plane perpendicular to the image. Range
     * [-180,180].
     * 
* * float pan_angle = 5; * * @param value The panAngle to set. * @return This builder for chaining. */ public Builder setPanAngle(float value) { panAngle_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Yaw angle, which indicates the leftward/rightward angle that the face is
     * pointing relative to the vertical plane perpendicular to the image. Range
     * [-180,180].
     * 
* * float pan_angle = 5; * * @return This builder for chaining. */ public Builder clearPanAngle() { bitField0_ = (bitField0_ & ~0x00000010); panAngle_ = 0F; onChanged(); return this; } private float tiltAngle_; /** * * *
     * Pitch angle, which indicates the upwards/downwards angle that the face is
     * pointing relative to the image's horizontal plane. Range [-180,180].
     * 
* * float tilt_angle = 6; * * @return The tiltAngle. */ @java.lang.Override public float getTiltAngle() { return tiltAngle_; } /** * * *
     * Pitch angle, which indicates the upwards/downwards angle that the face is
     * pointing relative to the image's horizontal plane. Range [-180,180].
     * 
* * float tilt_angle = 6; * * @param value The tiltAngle to set. * @return This builder for chaining. */ public Builder setTiltAngle(float value) { tiltAngle_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Pitch angle, which indicates the upwards/downwards angle that the face is
     * pointing relative to the image's horizontal plane. Range [-180,180].
     * 
* * float tilt_angle = 6; * * @return This builder for chaining. */ public Builder clearTiltAngle() { bitField0_ = (bitField0_ & ~0x00000020); tiltAngle_ = 0F; onChanged(); return this; } private float detectionConfidence_; /** * * *
     * Detection confidence. Range [0, 1].
     * 
* * float detection_confidence = 7; * * @return The detectionConfidence. */ @java.lang.Override public float getDetectionConfidence() { return detectionConfidence_; } /** * * *
     * Detection confidence. Range [0, 1].
     * 
* * float detection_confidence = 7; * * @param value The detectionConfidence to set. * @return This builder for chaining. */ public Builder setDetectionConfidence(float value) { detectionConfidence_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Detection confidence. Range [0, 1].
     * 
* * float detection_confidence = 7; * * @return This builder for chaining. */ public Builder clearDetectionConfidence() { bitField0_ = (bitField0_ & ~0x00000040); detectionConfidence_ = 0F; onChanged(); return this; } private float landmarkingConfidence_; /** * * *
     * Face landmarking confidence. Range [0, 1].
     * 
* * float landmarking_confidence = 8; * * @return The landmarkingConfidence. */ @java.lang.Override public float getLandmarkingConfidence() { return landmarkingConfidence_; } /** * * *
     * Face landmarking confidence. Range [0, 1].
     * 
* * float landmarking_confidence = 8; * * @param value The landmarkingConfidence to set. * @return This builder for chaining. */ public Builder setLandmarkingConfidence(float value) { landmarkingConfidence_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Face landmarking confidence. Range [0, 1].
     * 
* * float landmarking_confidence = 8; * * @return This builder for chaining. */ public Builder clearLandmarkingConfidence() { bitField0_ = (bitField0_ & ~0x00000080); landmarkingConfidence_ = 0F; onChanged(); return this; } private int joyLikelihood_ = 0; /** * * *
     * Joy likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @return The enum numeric value on the wire for joyLikelihood. */ @java.lang.Override public int getJoyLikelihoodValue() { return joyLikelihood_; } /** * * *
     * Joy likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @param value The enum numeric value on the wire for joyLikelihood to set. * @return This builder for chaining. */ public Builder setJoyLikelihoodValue(int value) { joyLikelihood_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * Joy likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @return The joyLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getJoyLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(joyLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Joy likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @param value The joyLikelihood to set. * @return This builder for chaining. */ public Builder setJoyLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000100; joyLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Joy likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood joy_likelihood = 9; * * @return This builder for chaining. */ public Builder clearJoyLikelihood() { bitField0_ = (bitField0_ & ~0x00000100); joyLikelihood_ = 0; onChanged(); return this; } private int sorrowLikelihood_ = 0; /** * * *
     * Sorrow likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @return The enum numeric value on the wire for sorrowLikelihood. */ @java.lang.Override public int getSorrowLikelihoodValue() { return sorrowLikelihood_; } /** * * *
     * Sorrow likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @param value The enum numeric value on the wire for sorrowLikelihood to set. * @return This builder for chaining. */ public Builder setSorrowLikelihoodValue(int value) { sorrowLikelihood_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Sorrow likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @return The sorrowLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSorrowLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(sorrowLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Sorrow likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @param value The sorrowLikelihood to set. * @return This builder for chaining. */ public Builder setSorrowLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000200; sorrowLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Sorrow likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood sorrow_likelihood = 10; * * @return This builder for chaining. */ public Builder clearSorrowLikelihood() { bitField0_ = (bitField0_ & ~0x00000200); sorrowLikelihood_ = 0; onChanged(); return this; } private int angerLikelihood_ = 0; /** * * *
     * Anger likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @return The enum numeric value on the wire for angerLikelihood. */ @java.lang.Override public int getAngerLikelihoodValue() { return angerLikelihood_; } /** * * *
     * Anger likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @param value The enum numeric value on the wire for angerLikelihood to set. * @return This builder for chaining. */ public Builder setAngerLikelihoodValue(int value) { angerLikelihood_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * Anger likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @return The angerLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getAngerLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(angerLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Anger likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @param value The angerLikelihood to set. * @return This builder for chaining. */ public Builder setAngerLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000400; angerLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Anger likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood anger_likelihood = 11; * * @return This builder for chaining. */ public Builder clearAngerLikelihood() { bitField0_ = (bitField0_ & ~0x00000400); angerLikelihood_ = 0; onChanged(); return this; } private int surpriseLikelihood_ = 0; /** * * *
     * Surprise likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @return The enum numeric value on the wire for surpriseLikelihood. */ @java.lang.Override public int getSurpriseLikelihoodValue() { return surpriseLikelihood_; } /** * * *
     * Surprise likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @param value The enum numeric value on the wire for surpriseLikelihood to set. * @return This builder for chaining. */ public Builder setSurpriseLikelihoodValue(int value) { surpriseLikelihood_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Surprise likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @return The surpriseLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getSurpriseLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(surpriseLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Surprise likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @param value The surpriseLikelihood to set. * @return This builder for chaining. */ public Builder setSurpriseLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000800; surpriseLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Surprise likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood surprise_likelihood = 12; * * @return This builder for chaining. */ public Builder clearSurpriseLikelihood() { bitField0_ = (bitField0_ & ~0x00000800); surpriseLikelihood_ = 0; onChanged(); return this; } private int underExposedLikelihood_ = 0; /** * * *
     * Under-exposed likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @return The enum numeric value on the wire for underExposedLikelihood. */ @java.lang.Override public int getUnderExposedLikelihoodValue() { return underExposedLikelihood_; } /** * * *
     * Under-exposed likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @param value The enum numeric value on the wire for underExposedLikelihood to set. * @return This builder for chaining. */ public Builder setUnderExposedLikelihoodValue(int value) { underExposedLikelihood_ = value; bitField0_ |= 0x00001000; onChanged(); return this; } /** * * *
     * Under-exposed likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @return The underExposedLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getUnderExposedLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(underExposedLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Under-exposed likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @param value The underExposedLikelihood to set. * @return This builder for chaining. */ public Builder setUnderExposedLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00001000; underExposedLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Under-exposed likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood under_exposed_likelihood = 13; * * @return This builder for chaining. */ public Builder clearUnderExposedLikelihood() { bitField0_ = (bitField0_ & ~0x00001000); underExposedLikelihood_ = 0; onChanged(); return this; } private int blurredLikelihood_ = 0; /** * * *
     * Blurred likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @return The enum numeric value on the wire for blurredLikelihood. */ @java.lang.Override public int getBlurredLikelihoodValue() { return blurredLikelihood_; } /** * * *
     * Blurred likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @param value The enum numeric value on the wire for blurredLikelihood to set. * @return This builder for chaining. */ public Builder setBlurredLikelihoodValue(int value) { blurredLikelihood_ = value; bitField0_ |= 0x00002000; onChanged(); return this; } /** * * *
     * Blurred likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @return The blurredLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getBlurredLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(blurredLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Blurred likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @param value The blurredLikelihood to set. * @return This builder for chaining. */ public Builder setBlurredLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00002000; blurredLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Blurred likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood blurred_likelihood = 14; * * @return This builder for chaining. */ public Builder clearBlurredLikelihood() { bitField0_ = (bitField0_ & ~0x00002000); blurredLikelihood_ = 0; onChanged(); return this; } private int headwearLikelihood_ = 0; /** * * *
     * Headwear likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @return The enum numeric value on the wire for headwearLikelihood. */ @java.lang.Override public int getHeadwearLikelihoodValue() { return headwearLikelihood_; } /** * * *
     * Headwear likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @param value The enum numeric value on the wire for headwearLikelihood to set. * @return This builder for chaining. */ public Builder setHeadwearLikelihoodValue(int value) { headwearLikelihood_ = value; bitField0_ |= 0x00004000; onChanged(); return this; } /** * * *
     * Headwear likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @return The headwearLikelihood. */ @java.lang.Override public com.google.cloud.vision.v1p3beta1.Likelihood getHeadwearLikelihood() { com.google.cloud.vision.v1p3beta1.Likelihood result = com.google.cloud.vision.v1p3beta1.Likelihood.forNumber(headwearLikelihood_); return result == null ? com.google.cloud.vision.v1p3beta1.Likelihood.UNRECOGNIZED : result; } /** * * *
     * Headwear likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @param value The headwearLikelihood to set. * @return This builder for chaining. */ public Builder setHeadwearLikelihood(com.google.cloud.vision.v1p3beta1.Likelihood value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00004000; headwearLikelihood_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Headwear likelihood.
     * 
* * .google.cloud.vision.v1p3beta1.Likelihood headwear_likelihood = 15; * * @return This builder for chaining. */ public Builder clearHeadwearLikelihood() { bitField0_ = (bitField0_ & ~0x00004000); headwearLikelihood_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) private static final com.google.cloud.vision.v1p3beta1.FaceAnnotation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.FaceAnnotation(); } public static com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FaceAnnotation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p3beta1.FaceAnnotation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy