com.google.cloud.vision.v1.AnnotateImageResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-vision-v1 Show documentation
Show all versions of grpc-google-cloud-vision-v1 Show documentation
GRPC library for grpc-google-cloud-vision-v1
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/vision/v1/image_annotator.proto
package com.google.cloud.vision.v1;
/**
*
* Response to an image annotation request.
*
*
* Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse}
*/
public final class AnnotateImageResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.vision.v1.AnnotateImageResponse)
AnnotateImageResponseOrBuilder {
// Use AnnotateImageResponse.newBuilder() to construct.
private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnnotateImageResponse() {
faceAnnotations_ = java.util.Collections.emptyList();
landmarkAnnotations_ = java.util.Collections.emptyList();
logoAnnotations_ = java.util.Collections.emptyList();
labelAnnotations_ = java.util.Collections.emptyList();
textAnnotations_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private AnnotateImageResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
faceAnnotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
faceAnnotations_.add(
input.readMessage(com.google.cloud.vision.v1.FaceAnnotation.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
landmarkAnnotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
landmarkAnnotations_.add(
input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry));
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
logoAnnotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
logoAnnotations_.add(
input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
labelAnnotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
labelAnnotations_.add(
input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry));
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
textAnnotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
textAnnotations_.add(
input.readMessage(com.google.cloud.vision.v1.EntityAnnotation.parser(), extensionRegistry));
break;
}
case 50: {
com.google.cloud.vision.v1.SafeSearchAnnotation.Builder subBuilder = null;
if (safeSearchAnnotation_ != null) {
subBuilder = safeSearchAnnotation_.toBuilder();
}
safeSearchAnnotation_ = input.readMessage(com.google.cloud.vision.v1.SafeSearchAnnotation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(safeSearchAnnotation_);
safeSearchAnnotation_ = subBuilder.buildPartial();
}
break;
}
case 66: {
com.google.cloud.vision.v1.ImageProperties.Builder subBuilder = null;
if (imagePropertiesAnnotation_ != null) {
subBuilder = imagePropertiesAnnotation_.toBuilder();
}
imagePropertiesAnnotation_ = input.readMessage(com.google.cloud.vision.v1.ImageProperties.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(imagePropertiesAnnotation_);
imagePropertiesAnnotation_ = subBuilder.buildPartial();
}
break;
}
case 74: {
com.google.rpc.Status.Builder subBuilder = null;
if (error_ != null) {
subBuilder = error_.toBuilder();
}
error_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(error_);
error_ = subBuilder.buildPartial();
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_);
}
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class);
}
private int bitField0_;
public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1;
private java.util.List faceAnnotations_;
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public java.util.List getFaceAnnotationsList() {
return faceAnnotations_;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public java.util.List extends com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsOrBuilderList() {
return faceAnnotations_;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public int getFaceAnnotationsCount() {
return faceAnnotations_.size();
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) {
return faceAnnotations_.get(index);
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(
int index) {
return faceAnnotations_.get(index);
}
public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2;
private java.util.List landmarkAnnotations_;
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public java.util.List getLandmarkAnnotationsList() {
return landmarkAnnotations_;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsOrBuilderList() {
return landmarkAnnotations_;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public int getLandmarkAnnotationsCount() {
return landmarkAnnotations_.size();
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) {
return landmarkAnnotations_.get(index);
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(
int index) {
return landmarkAnnotations_.get(index);
}
public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3;
private java.util.List logoAnnotations_;
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public java.util.List getLogoAnnotationsList() {
return logoAnnotations_;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsOrBuilderList() {
return logoAnnotations_;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public int getLogoAnnotationsCount() {
return logoAnnotations_.size();
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) {
return logoAnnotations_.get(index);
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
int index) {
return logoAnnotations_.get(index);
}
public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4;
private java.util.List labelAnnotations_;
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public java.util.List getLabelAnnotationsList() {
return labelAnnotations_;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsOrBuilderList() {
return labelAnnotations_;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public int getLabelAnnotationsCount() {
return labelAnnotations_.size();
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) {
return labelAnnotations_.get(index);
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
int index) {
return labelAnnotations_.get(index);
}
public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5;
private java.util.List textAnnotations_;
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public java.util.List getTextAnnotationsList() {
return textAnnotations_;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsOrBuilderList() {
return textAnnotations_;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public int getTextAnnotationsCount() {
return textAnnotations_.size();
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) {
return textAnnotations_.get(index);
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
int index) {
return textAnnotations_.get(index);
}
public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6;
private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_;
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public boolean hasSafeSearchAnnotation() {
return safeSearchAnnotation_ != null;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() {
return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() {
return getSafeSearchAnnotation();
}
public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8;
private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_;
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public boolean hasImagePropertiesAnnotation() {
return imagePropertiesAnnotation_ != null;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() {
return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() {
return getImagePropertiesAnnotation();
}
public static final int ERROR_FIELD_NUMBER = 9;
private com.google.rpc.Status error_;
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public boolean hasError() {
return error_ != null;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public com.google.rpc.Status getError() {
return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
return getError();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < faceAnnotations_.size(); i++) {
output.writeMessage(1, faceAnnotations_.get(i));
}
for (int i = 0; i < landmarkAnnotations_.size(); i++) {
output.writeMessage(2, landmarkAnnotations_.get(i));
}
for (int i = 0; i < logoAnnotations_.size(); i++) {
output.writeMessage(3, logoAnnotations_.get(i));
}
for (int i = 0; i < labelAnnotations_.size(); i++) {
output.writeMessage(4, labelAnnotations_.get(i));
}
for (int i = 0; i < textAnnotations_.size(); i++) {
output.writeMessage(5, textAnnotations_.get(i));
}
if (safeSearchAnnotation_ != null) {
output.writeMessage(6, getSafeSearchAnnotation());
}
if (imagePropertiesAnnotation_ != null) {
output.writeMessage(8, getImagePropertiesAnnotation());
}
if (error_ != null) {
output.writeMessage(9, getError());
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < faceAnnotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, faceAnnotations_.get(i));
}
for (int i = 0; i < landmarkAnnotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, landmarkAnnotations_.get(i));
}
for (int i = 0; i < logoAnnotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, logoAnnotations_.get(i));
}
for (int i = 0; i < labelAnnotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, labelAnnotations_.get(i));
}
for (int i = 0; i < textAnnotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, textAnnotations_.get(i));
}
if (safeSearchAnnotation_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getSafeSearchAnnotation());
}
if (imagePropertiesAnnotation_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getImagePropertiesAnnotation());
}
if (error_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getError());
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.vision.v1.AnnotateImageResponse)) {
return super.equals(obj);
}
com.google.cloud.vision.v1.AnnotateImageResponse other = (com.google.cloud.vision.v1.AnnotateImageResponse) obj;
boolean result = true;
result = result && getFaceAnnotationsList()
.equals(other.getFaceAnnotationsList());
result = result && getLandmarkAnnotationsList()
.equals(other.getLandmarkAnnotationsList());
result = result && getLogoAnnotationsList()
.equals(other.getLogoAnnotationsList());
result = result && getLabelAnnotationsList()
.equals(other.getLabelAnnotationsList());
result = result && getTextAnnotationsList()
.equals(other.getTextAnnotationsList());
result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation());
if (hasSafeSearchAnnotation()) {
result = result && getSafeSearchAnnotation()
.equals(other.getSafeSearchAnnotation());
}
result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation());
if (hasImagePropertiesAnnotation()) {
result = result && getImagePropertiesAnnotation()
.equals(other.getImagePropertiesAnnotation());
}
result = result && (hasError() == other.hasError());
if (hasError()) {
result = result && getError()
.equals(other.getError());
}
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
if (getFaceAnnotationsCount() > 0) {
hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getFaceAnnotationsList().hashCode();
}
if (getLandmarkAnnotationsCount() > 0) {
hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getLandmarkAnnotationsList().hashCode();
}
if (getLogoAnnotationsCount() > 0) {
hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getLogoAnnotationsList().hashCode();
}
if (getLabelAnnotationsCount() > 0) {
hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getLabelAnnotationsList().hashCode();
}
if (getTextAnnotationsCount() > 0) {
hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getTextAnnotationsList().hashCode();
}
if (hasSafeSearchAnnotation()) {
hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER;
hash = (53 * hash) + getSafeSearchAnnotation().hashCode();
}
if (hasImagePropertiesAnnotation()) {
hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER;
hash = (53 * hash) + getImagePropertiesAnnotation().hashCode();
}
if (hasError()) {
hash = (37 * hash) + ERROR_FIELD_NUMBER;
hash = (53 * hash) + getError().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse 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.v1.AnnotateImageResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse 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.v1.AnnotateImageResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse 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.v1.AnnotateImageResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.vision.v1.AnnotateImageResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.vision.v1.AnnotateImageResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Response to an image annotation request.
*
*
* Protobuf type {@code google.cloud.vision.v1.AnnotateImageResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.vision.v1.AnnotateImageResponse)
com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.vision.v1.AnnotateImageResponse.class, com.google.cloud.vision.v1.AnnotateImageResponse.Builder.class);
}
// Construct using com.google.cloud.vision.v1.AnnotateImageResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFaceAnnotationsFieldBuilder();
getLandmarkAnnotationsFieldBuilder();
getLogoAnnotationsFieldBuilder();
getLabelAnnotationsFieldBuilder();
getTextAnnotationsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (faceAnnotationsBuilder_ == null) {
faceAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
faceAnnotationsBuilder_.clear();
}
if (landmarkAnnotationsBuilder_ == null) {
landmarkAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
landmarkAnnotationsBuilder_.clear();
}
if (logoAnnotationsBuilder_ == null) {
logoAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
logoAnnotationsBuilder_.clear();
}
if (labelAnnotationsBuilder_ == null) {
labelAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
labelAnnotationsBuilder_.clear();
}
if (textAnnotationsBuilder_ == null) {
textAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
textAnnotationsBuilder_.clear();
}
if (safeSearchAnnotationBuilder_ == null) {
safeSearchAnnotation_ = null;
} else {
safeSearchAnnotation_ = null;
safeSearchAnnotationBuilder_ = null;
}
if (imagePropertiesAnnotationBuilder_ == null) {
imagePropertiesAnnotation_ = null;
} else {
imagePropertiesAnnotation_ = null;
imagePropertiesAnnotationBuilder_ = null;
}
if (errorBuilder_ == null) {
error_ = null;
} else {
error_ = null;
errorBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.vision.v1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1_AnnotateImageResponse_descriptor;
}
public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() {
return com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance();
}
public com.google.cloud.vision.v1.AnnotateImageResponse build() {
com.google.cloud.vision.v1.AnnotateImageResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() {
com.google.cloud.vision.v1.AnnotateImageResponse result = new com.google.cloud.vision.v1.AnnotateImageResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (faceAnnotationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.faceAnnotations_ = faceAnnotations_;
} else {
result.faceAnnotations_ = faceAnnotationsBuilder_.build();
}
if (landmarkAnnotationsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.landmarkAnnotations_ = landmarkAnnotations_;
} else {
result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build();
}
if (logoAnnotationsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.logoAnnotations_ = logoAnnotations_;
} else {
result.logoAnnotations_ = logoAnnotationsBuilder_.build();
}
if (labelAnnotationsBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.labelAnnotations_ = labelAnnotations_;
} else {
result.labelAnnotations_ = labelAnnotationsBuilder_.build();
}
if (textAnnotationsBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.textAnnotations_ = textAnnotations_;
} else {
result.textAnnotations_ = textAnnotationsBuilder_.build();
}
if (safeSearchAnnotationBuilder_ == null) {
result.safeSearchAnnotation_ = safeSearchAnnotation_;
} else {
result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_.build();
}
if (imagePropertiesAnnotationBuilder_ == null) {
result.imagePropertiesAnnotation_ = imagePropertiesAnnotation_;
} else {
result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_.build();
}
if (errorBuilder_ == null) {
result.error_ = error_;
} else {
result.error_ = errorBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.vision.v1.AnnotateImageResponse) {
return mergeFrom((com.google.cloud.vision.v1.AnnotateImageResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.vision.v1.AnnotateImageResponse other) {
if (other == com.google.cloud.vision.v1.AnnotateImageResponse.getDefaultInstance()) return this;
if (faceAnnotationsBuilder_ == null) {
if (!other.faceAnnotations_.isEmpty()) {
if (faceAnnotations_.isEmpty()) {
faceAnnotations_ = other.faceAnnotations_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFaceAnnotationsIsMutable();
faceAnnotations_.addAll(other.faceAnnotations_);
}
onChanged();
}
} else {
if (!other.faceAnnotations_.isEmpty()) {
if (faceAnnotationsBuilder_.isEmpty()) {
faceAnnotationsBuilder_.dispose();
faceAnnotationsBuilder_ = null;
faceAnnotations_ = other.faceAnnotations_;
bitField0_ = (bitField0_ & ~0x00000001);
faceAnnotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFaceAnnotationsFieldBuilder() : null;
} else {
faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_);
}
}
}
if (landmarkAnnotationsBuilder_ == null) {
if (!other.landmarkAnnotations_.isEmpty()) {
if (landmarkAnnotations_.isEmpty()) {
landmarkAnnotations_ = other.landmarkAnnotations_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.addAll(other.landmarkAnnotations_);
}
onChanged();
}
} else {
if (!other.landmarkAnnotations_.isEmpty()) {
if (landmarkAnnotationsBuilder_.isEmpty()) {
landmarkAnnotationsBuilder_.dispose();
landmarkAnnotationsBuilder_ = null;
landmarkAnnotations_ = other.landmarkAnnotations_;
bitField0_ = (bitField0_ & ~0x00000002);
landmarkAnnotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLandmarkAnnotationsFieldBuilder() : null;
} else {
landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_);
}
}
}
if (logoAnnotationsBuilder_ == null) {
if (!other.logoAnnotations_.isEmpty()) {
if (logoAnnotations_.isEmpty()) {
logoAnnotations_ = other.logoAnnotations_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureLogoAnnotationsIsMutable();
logoAnnotations_.addAll(other.logoAnnotations_);
}
onChanged();
}
} else {
if (!other.logoAnnotations_.isEmpty()) {
if (logoAnnotationsBuilder_.isEmpty()) {
logoAnnotationsBuilder_.dispose();
logoAnnotationsBuilder_ = null;
logoAnnotations_ = other.logoAnnotations_;
bitField0_ = (bitField0_ & ~0x00000004);
logoAnnotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLogoAnnotationsFieldBuilder() : null;
} else {
logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_);
}
}
}
if (labelAnnotationsBuilder_ == null) {
if (!other.labelAnnotations_.isEmpty()) {
if (labelAnnotations_.isEmpty()) {
labelAnnotations_ = other.labelAnnotations_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureLabelAnnotationsIsMutable();
labelAnnotations_.addAll(other.labelAnnotations_);
}
onChanged();
}
} else {
if (!other.labelAnnotations_.isEmpty()) {
if (labelAnnotationsBuilder_.isEmpty()) {
labelAnnotationsBuilder_.dispose();
labelAnnotationsBuilder_ = null;
labelAnnotations_ = other.labelAnnotations_;
bitField0_ = (bitField0_ & ~0x00000008);
labelAnnotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelAnnotationsFieldBuilder() : null;
} else {
labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_);
}
}
}
if (textAnnotationsBuilder_ == null) {
if (!other.textAnnotations_.isEmpty()) {
if (textAnnotations_.isEmpty()) {
textAnnotations_ = other.textAnnotations_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureTextAnnotationsIsMutable();
textAnnotations_.addAll(other.textAnnotations_);
}
onChanged();
}
} else {
if (!other.textAnnotations_.isEmpty()) {
if (textAnnotationsBuilder_.isEmpty()) {
textAnnotationsBuilder_.dispose();
textAnnotationsBuilder_ = null;
textAnnotations_ = other.textAnnotations_;
bitField0_ = (bitField0_ & ~0x00000010);
textAnnotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTextAnnotationsFieldBuilder() : null;
} else {
textAnnotationsBuilder_.addAllMessages(other.textAnnotations_);
}
}
}
if (other.hasSafeSearchAnnotation()) {
mergeSafeSearchAnnotation(other.getSafeSearchAnnotation());
}
if (other.hasImagePropertiesAnnotation()) {
mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation());
}
if (other.hasError()) {
mergeError(other.getError());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.vision.v1.AnnotateImageResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.vision.v1.AnnotateImageResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List faceAnnotations_ =
java.util.Collections.emptyList();
private void ensureFaceAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
faceAnnotations_ = new java.util.ArrayList(faceAnnotations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_;
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public java.util.List getFaceAnnotationsList() {
if (faceAnnotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(faceAnnotations_);
} else {
return faceAnnotationsBuilder_.getMessageList();
}
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public int getFaceAnnotationsCount() {
if (faceAnnotationsBuilder_ == null) {
return faceAnnotations_.size();
} else {
return faceAnnotationsBuilder_.getCount();
}
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotation getFaceAnnotations(int index) {
if (faceAnnotationsBuilder_ == null) {
return faceAnnotations_.get(index);
} else {
return faceAnnotationsBuilder_.getMessage(index);
}
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder setFaceAnnotations(
int index, com.google.cloud.vision.v1.FaceAnnotation value) {
if (faceAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFaceAnnotationsIsMutable();
faceAnnotations_.set(index, value);
onChanged();
} else {
faceAnnotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder setFaceAnnotations(
int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
if (faceAnnotationsBuilder_ == null) {
ensureFaceAnnotationsIsMutable();
faceAnnotations_.set(index, builderForValue.build());
onChanged();
} else {
faceAnnotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder addFaceAnnotations(com.google.cloud.vision.v1.FaceAnnotation value) {
if (faceAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFaceAnnotationsIsMutable();
faceAnnotations_.add(value);
onChanged();
} else {
faceAnnotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder addFaceAnnotations(
int index, com.google.cloud.vision.v1.FaceAnnotation value) {
if (faceAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFaceAnnotationsIsMutable();
faceAnnotations_.add(index, value);
onChanged();
} else {
faceAnnotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder addFaceAnnotations(
com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
if (faceAnnotationsBuilder_ == null) {
ensureFaceAnnotationsIsMutable();
faceAnnotations_.add(builderForValue.build());
onChanged();
} else {
faceAnnotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder addFaceAnnotations(
int index, com.google.cloud.vision.v1.FaceAnnotation.Builder builderForValue) {
if (faceAnnotationsBuilder_ == null) {
ensureFaceAnnotationsIsMutable();
faceAnnotations_.add(index, builderForValue.build());
onChanged();
} else {
faceAnnotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder addAllFaceAnnotations(
java.lang.Iterable extends com.google.cloud.vision.v1.FaceAnnotation> values) {
if (faceAnnotationsBuilder_ == null) {
ensureFaceAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, faceAnnotations_);
onChanged();
} else {
faceAnnotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder clearFaceAnnotations() {
if (faceAnnotationsBuilder_ == null) {
faceAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
faceAnnotationsBuilder_.clear();
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public Builder removeFaceAnnotations(int index) {
if (faceAnnotationsBuilder_ == null) {
ensureFaceAnnotationsIsMutable();
faceAnnotations_.remove(index);
onChanged();
} else {
faceAnnotationsBuilder_.remove(index);
}
return this;
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotation.Builder getFaceAnnotationsBuilder(
int index) {
return getFaceAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(
int index) {
if (faceAnnotationsBuilder_ == null) {
return faceAnnotations_.get(index); } else {
return faceAnnotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public java.util.List extends com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsOrBuilderList() {
if (faceAnnotationsBuilder_ != null) {
return faceAnnotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(faceAnnotations_);
}
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder() {
return getFaceAnnotationsFieldBuilder().addBuilder(
com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance());
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuilder(
int index) {
return getFaceAnnotationsFieldBuilder().addBuilder(
index, com.google.cloud.vision.v1.FaceAnnotation.getDefaultInstance());
}
/**
*
* If present, face detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.FaceAnnotation face_annotations = 1;
*/
public java.util.List
getFaceAnnotationsBuilderList() {
return getFaceAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder>
getFaceAnnotationsFieldBuilder() {
if (faceAnnotationsBuilder_ == null) {
faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.FaceAnnotation, com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder>(
faceAnnotations_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
faceAnnotations_ = null;
}
return faceAnnotationsBuilder_;
}
private java.util.List landmarkAnnotations_ =
java.util.Collections.emptyList();
private void ensureLandmarkAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
landmarkAnnotations_ = new java.util.ArrayList(landmarkAnnotations_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_;
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public java.util.List getLandmarkAnnotationsList() {
if (landmarkAnnotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(landmarkAnnotations_);
} else {
return landmarkAnnotationsBuilder_.getMessageList();
}
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public int getLandmarkAnnotationsCount() {
if (landmarkAnnotationsBuilder_ == null) {
return landmarkAnnotations_.size();
} else {
return landmarkAnnotationsBuilder_.getCount();
}
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLandmarkAnnotations(int index) {
if (landmarkAnnotationsBuilder_ == null) {
return landmarkAnnotations_.get(index);
} else {
return landmarkAnnotationsBuilder_.getMessage(index);
}
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder setLandmarkAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (landmarkAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.set(index, value);
onChanged();
} else {
landmarkAnnotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder setLandmarkAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (landmarkAnnotationsBuilder_ == null) {
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.set(index, builderForValue.build());
onChanged();
} else {
landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder addLandmarkAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
if (landmarkAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.add(value);
onChanged();
} else {
landmarkAnnotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder addLandmarkAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (landmarkAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.add(index, value);
onChanged();
} else {
landmarkAnnotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder addLandmarkAnnotations(
com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (landmarkAnnotationsBuilder_ == null) {
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.add(builderForValue.build());
onChanged();
} else {
landmarkAnnotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder addLandmarkAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (landmarkAnnotationsBuilder_ == null) {
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.add(index, builderForValue.build());
onChanged();
} else {
landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder addAllLandmarkAnnotations(
java.lang.Iterable extends com.google.cloud.vision.v1.EntityAnnotation> values) {
if (landmarkAnnotationsBuilder_ == null) {
ensureLandmarkAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, landmarkAnnotations_);
onChanged();
} else {
landmarkAnnotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder clearLandmarkAnnotations() {
if (landmarkAnnotationsBuilder_ == null) {
landmarkAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
landmarkAnnotationsBuilder_.clear();
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public Builder removeLandmarkAnnotations(int index) {
if (landmarkAnnotationsBuilder_ == null) {
ensureLandmarkAnnotationsIsMutable();
landmarkAnnotations_.remove(index);
onChanged();
} else {
landmarkAnnotationsBuilder_.remove(index);
}
return this;
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder(
int index) {
return getLandmarkAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(
int index) {
if (landmarkAnnotationsBuilder_ == null) {
return landmarkAnnotations_.get(index); } else {
return landmarkAnnotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsOrBuilderList() {
if (landmarkAnnotationsBuilder_ != null) {
return landmarkAnnotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(landmarkAnnotations_);
}
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() {
return getLandmarkAnnotationsFieldBuilder().addBuilder(
com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder(
int index) {
return getLandmarkAnnotationsFieldBuilder().addBuilder(
index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, landmark detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation landmark_annotations = 2;
*/
public java.util.List
getLandmarkAnnotationsBuilderList() {
return getLandmarkAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLandmarkAnnotationsFieldBuilder() {
if (landmarkAnnotationsBuilder_ == null) {
landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
landmarkAnnotations_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
landmarkAnnotations_ = null;
}
return landmarkAnnotationsBuilder_;
}
private java.util.List logoAnnotations_ =
java.util.Collections.emptyList();
private void ensureLogoAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
logoAnnotations_ = new java.util.ArrayList(logoAnnotations_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_;
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public java.util.List getLogoAnnotationsList() {
if (logoAnnotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(logoAnnotations_);
} else {
return logoAnnotationsBuilder_.getMessageList();
}
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public int getLogoAnnotationsCount() {
if (logoAnnotationsBuilder_ == null) {
return logoAnnotations_.size();
} else {
return logoAnnotationsBuilder_.getCount();
}
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLogoAnnotations(int index) {
if (logoAnnotationsBuilder_ == null) {
return logoAnnotations_.get(index);
} else {
return logoAnnotationsBuilder_.getMessage(index);
}
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder setLogoAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (logoAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogoAnnotationsIsMutable();
logoAnnotations_.set(index, value);
onChanged();
} else {
logoAnnotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder setLogoAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (logoAnnotationsBuilder_ == null) {
ensureLogoAnnotationsIsMutable();
logoAnnotations_.set(index, builderForValue.build());
onChanged();
} else {
logoAnnotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder addLogoAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
if (logoAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogoAnnotationsIsMutable();
logoAnnotations_.add(value);
onChanged();
} else {
logoAnnotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder addLogoAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (logoAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogoAnnotationsIsMutable();
logoAnnotations_.add(index, value);
onChanged();
} else {
logoAnnotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder addLogoAnnotations(
com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (logoAnnotationsBuilder_ == null) {
ensureLogoAnnotationsIsMutable();
logoAnnotations_.add(builderForValue.build());
onChanged();
} else {
logoAnnotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder addLogoAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (logoAnnotationsBuilder_ == null) {
ensureLogoAnnotationsIsMutable();
logoAnnotations_.add(index, builderForValue.build());
onChanged();
} else {
logoAnnotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder addAllLogoAnnotations(
java.lang.Iterable extends com.google.cloud.vision.v1.EntityAnnotation> values) {
if (logoAnnotationsBuilder_ == null) {
ensureLogoAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, logoAnnotations_);
onChanged();
} else {
logoAnnotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder clearLogoAnnotations() {
if (logoAnnotationsBuilder_ == null) {
logoAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
logoAnnotationsBuilder_.clear();
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public Builder removeLogoAnnotations(int index) {
if (logoAnnotationsBuilder_ == null) {
ensureLogoAnnotationsIsMutable();
logoAnnotations_.remove(index);
onChanged();
} else {
logoAnnotationsBuilder_.remove(index);
}
return this;
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder getLogoAnnotationsBuilder(
int index) {
return getLogoAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
int index) {
if (logoAnnotationsBuilder_ == null) {
return logoAnnotations_.get(index); } else {
return logoAnnotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsOrBuilderList() {
if (logoAnnotationsBuilder_ != null) {
return logoAnnotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(logoAnnotations_);
}
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder() {
return getLogoAnnotationsFieldBuilder().addBuilder(
com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBuilder(
int index) {
return getLogoAnnotationsFieldBuilder().addBuilder(
index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, logo detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation logo_annotations = 3;
*/
public java.util.List
getLogoAnnotationsBuilderList() {
return getLogoAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLogoAnnotationsFieldBuilder() {
if (logoAnnotationsBuilder_ == null) {
logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
logoAnnotations_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
logoAnnotations_ = null;
}
return logoAnnotationsBuilder_;
}
private java.util.List labelAnnotations_ =
java.util.Collections.emptyList();
private void ensureLabelAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
labelAnnotations_ = new java.util.ArrayList(labelAnnotations_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_;
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public java.util.List getLabelAnnotationsList() {
if (labelAnnotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(labelAnnotations_);
} else {
return labelAnnotationsBuilder_.getMessageList();
}
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public int getLabelAnnotationsCount() {
if (labelAnnotationsBuilder_ == null) {
return labelAnnotations_.size();
} else {
return labelAnnotationsBuilder_.getCount();
}
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotation getLabelAnnotations(int index) {
if (labelAnnotationsBuilder_ == null) {
return labelAnnotations_.get(index);
} else {
return labelAnnotationsBuilder_.getMessage(index);
}
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder setLabelAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (labelAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelAnnotationsIsMutable();
labelAnnotations_.set(index, value);
onChanged();
} else {
labelAnnotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder setLabelAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (labelAnnotationsBuilder_ == null) {
ensureLabelAnnotationsIsMutable();
labelAnnotations_.set(index, builderForValue.build());
onChanged();
} else {
labelAnnotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder addLabelAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
if (labelAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelAnnotationsIsMutable();
labelAnnotations_.add(value);
onChanged();
} else {
labelAnnotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder addLabelAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (labelAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelAnnotationsIsMutable();
labelAnnotations_.add(index, value);
onChanged();
} else {
labelAnnotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder addLabelAnnotations(
com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (labelAnnotationsBuilder_ == null) {
ensureLabelAnnotationsIsMutable();
labelAnnotations_.add(builderForValue.build());
onChanged();
} else {
labelAnnotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder addLabelAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (labelAnnotationsBuilder_ == null) {
ensureLabelAnnotationsIsMutable();
labelAnnotations_.add(index, builderForValue.build());
onChanged();
} else {
labelAnnotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder addAllLabelAnnotations(
java.lang.Iterable extends com.google.cloud.vision.v1.EntityAnnotation> values) {
if (labelAnnotationsBuilder_ == null) {
ensureLabelAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labelAnnotations_);
onChanged();
} else {
labelAnnotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder clearLabelAnnotations() {
if (labelAnnotationsBuilder_ == null) {
labelAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
labelAnnotationsBuilder_.clear();
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public Builder removeLabelAnnotations(int index) {
if (labelAnnotationsBuilder_ == null) {
ensureLabelAnnotationsIsMutable();
labelAnnotations_.remove(index);
onChanged();
} else {
labelAnnotationsBuilder_.remove(index);
}
return this;
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder getLabelAnnotationsBuilder(
int index) {
return getLabelAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
int index) {
if (labelAnnotationsBuilder_ == null) {
return labelAnnotations_.get(index); } else {
return labelAnnotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsOrBuilderList() {
if (labelAnnotationsBuilder_ != null) {
return labelAnnotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(labelAnnotations_);
}
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder() {
return getLabelAnnotationsFieldBuilder().addBuilder(
com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBuilder(
int index) {
return getLabelAnnotationsFieldBuilder().addBuilder(
index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, label detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation label_annotations = 4;
*/
public java.util.List
getLabelAnnotationsBuilderList() {
return getLabelAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getLabelAnnotationsFieldBuilder() {
if (labelAnnotationsBuilder_ == null) {
labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
labelAnnotations_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
labelAnnotations_ = null;
}
return labelAnnotationsBuilder_;
}
private java.util.List textAnnotations_ =
java.util.Collections.emptyList();
private void ensureTextAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
textAnnotations_ = new java.util.ArrayList(textAnnotations_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder> textAnnotationsBuilder_;
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public java.util.List getTextAnnotationsList() {
if (textAnnotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(textAnnotations_);
} else {
return textAnnotationsBuilder_.getMessageList();
}
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public int getTextAnnotationsCount() {
if (textAnnotationsBuilder_ == null) {
return textAnnotations_.size();
} else {
return textAnnotationsBuilder_.getCount();
}
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotation getTextAnnotations(int index) {
if (textAnnotationsBuilder_ == null) {
return textAnnotations_.get(index);
} else {
return textAnnotationsBuilder_.getMessage(index);
}
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder setTextAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (textAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTextAnnotationsIsMutable();
textAnnotations_.set(index, value);
onChanged();
} else {
textAnnotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder setTextAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (textAnnotationsBuilder_ == null) {
ensureTextAnnotationsIsMutable();
textAnnotations_.set(index, builderForValue.build());
onChanged();
} else {
textAnnotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder addTextAnnotations(com.google.cloud.vision.v1.EntityAnnotation value) {
if (textAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTextAnnotationsIsMutable();
textAnnotations_.add(value);
onChanged();
} else {
textAnnotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder addTextAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation value) {
if (textAnnotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTextAnnotationsIsMutable();
textAnnotations_.add(index, value);
onChanged();
} else {
textAnnotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder addTextAnnotations(
com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (textAnnotationsBuilder_ == null) {
ensureTextAnnotationsIsMutable();
textAnnotations_.add(builderForValue.build());
onChanged();
} else {
textAnnotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder addTextAnnotations(
int index, com.google.cloud.vision.v1.EntityAnnotation.Builder builderForValue) {
if (textAnnotationsBuilder_ == null) {
ensureTextAnnotationsIsMutable();
textAnnotations_.add(index, builderForValue.build());
onChanged();
} else {
textAnnotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder addAllTextAnnotations(
java.lang.Iterable extends com.google.cloud.vision.v1.EntityAnnotation> values) {
if (textAnnotationsBuilder_ == null) {
ensureTextAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, textAnnotations_);
onChanged();
} else {
textAnnotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder clearTextAnnotations() {
if (textAnnotationsBuilder_ == null) {
textAnnotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
textAnnotationsBuilder_.clear();
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public Builder removeTextAnnotations(int index) {
if (textAnnotationsBuilder_ == null) {
ensureTextAnnotationsIsMutable();
textAnnotations_.remove(index);
onChanged();
} else {
textAnnotationsBuilder_.remove(index);
}
return this;
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder getTextAnnotationsBuilder(
int index) {
return getTextAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
int index) {
if (textAnnotationsBuilder_ == null) {
return textAnnotations_.get(index); } else {
return textAnnotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public java.util.List extends com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsOrBuilderList() {
if (textAnnotationsBuilder_ != null) {
return textAnnotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(textAnnotations_);
}
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder() {
return getTextAnnotationsFieldBuilder().addBuilder(
com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBuilder(
int index) {
return getTextAnnotationsFieldBuilder().addBuilder(
index, com.google.cloud.vision.v1.EntityAnnotation.getDefaultInstance());
}
/**
*
* If present, text (OCR) detection completed successfully.
*
*
* repeated .google.cloud.vision.v1.EntityAnnotation text_annotations = 5;
*/
public java.util.List
getTextAnnotationsBuilderList() {
return getTextAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>
getTextAnnotationsFieldBuilder() {
if (textAnnotationsBuilder_ == null) {
textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.vision.v1.EntityAnnotation, com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>(
textAnnotations_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
textAnnotations_ = null;
}
return textAnnotationsBuilder_;
}
private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_;
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public boolean hasSafeSearchAnnotation() {
return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public com.google.cloud.vision.v1.SafeSearchAnnotation getSafeSearchAnnotation() {
if (safeSearchAnnotationBuilder_ == null) {
return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_;
} else {
return safeSearchAnnotationBuilder_.getMessage();
}
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public Builder setSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) {
if (safeSearchAnnotationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
safeSearchAnnotation_ = value;
onChanged();
} else {
safeSearchAnnotationBuilder_.setMessage(value);
}
return this;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public Builder setSafeSearchAnnotation(
com.google.cloud.vision.v1.SafeSearchAnnotation.Builder builderForValue) {
if (safeSearchAnnotationBuilder_ == null) {
safeSearchAnnotation_ = builderForValue.build();
onChanged();
} else {
safeSearchAnnotationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public Builder mergeSafeSearchAnnotation(com.google.cloud.vision.v1.SafeSearchAnnotation value) {
if (safeSearchAnnotationBuilder_ == null) {
if (safeSearchAnnotation_ != null) {
safeSearchAnnotation_ =
com.google.cloud.vision.v1.SafeSearchAnnotation.newBuilder(safeSearchAnnotation_).mergeFrom(value).buildPartial();
} else {
safeSearchAnnotation_ = value;
}
onChanged();
} else {
safeSearchAnnotationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public Builder clearSafeSearchAnnotation() {
if (safeSearchAnnotationBuilder_ == null) {
safeSearchAnnotation_ = null;
onChanged();
} else {
safeSearchAnnotation_ = null;
safeSearchAnnotationBuilder_ = null;
}
return this;
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public com.google.cloud.vision.v1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() {
onChanged();
return getSafeSearchAnnotationFieldBuilder().getBuilder();
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
public com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() {
if (safeSearchAnnotationBuilder_ != null) {
return safeSearchAnnotationBuilder_.getMessageOrBuilder();
} else {
return safeSearchAnnotation_ == null ?
com.google.cloud.vision.v1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_;
}
}
/**
*
* If present, safe-search annotation completed successfully.
*
*
* optional .google.cloud.vision.v1.SafeSearchAnnotation safe_search_annotation = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>
getSafeSearchAnnotationFieldBuilder() {
if (safeSearchAnnotationBuilder_ == null) {
safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1.SafeSearchAnnotationOrBuilder>(
getSafeSearchAnnotation(),
getParentForChildren(),
isClean());
safeSearchAnnotation_ = null;
}
return safeSearchAnnotationBuilder_;
}
private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_;
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public boolean hasImagePropertiesAnnotation() {
return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public com.google.cloud.vision.v1.ImageProperties getImagePropertiesAnnotation() {
if (imagePropertiesAnnotationBuilder_ == null) {
return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_;
} else {
return imagePropertiesAnnotationBuilder_.getMessage();
}
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public Builder setImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) {
if (imagePropertiesAnnotationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
imagePropertiesAnnotation_ = value;
onChanged();
} else {
imagePropertiesAnnotationBuilder_.setMessage(value);
}
return this;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public Builder setImagePropertiesAnnotation(
com.google.cloud.vision.v1.ImageProperties.Builder builderForValue) {
if (imagePropertiesAnnotationBuilder_ == null) {
imagePropertiesAnnotation_ = builderForValue.build();
onChanged();
} else {
imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public Builder mergeImagePropertiesAnnotation(com.google.cloud.vision.v1.ImageProperties value) {
if (imagePropertiesAnnotationBuilder_ == null) {
if (imagePropertiesAnnotation_ != null) {
imagePropertiesAnnotation_ =
com.google.cloud.vision.v1.ImageProperties.newBuilder(imagePropertiesAnnotation_).mergeFrom(value).buildPartial();
} else {
imagePropertiesAnnotation_ = value;
}
onChanged();
} else {
imagePropertiesAnnotationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public Builder clearImagePropertiesAnnotation() {
if (imagePropertiesAnnotationBuilder_ == null) {
imagePropertiesAnnotation_ = null;
onChanged();
} else {
imagePropertiesAnnotation_ = null;
imagePropertiesAnnotationBuilder_ = null;
}
return this;
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public com.google.cloud.vision.v1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() {
onChanged();
return getImagePropertiesAnnotationFieldBuilder().getBuilder();
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
public com.google.cloud.vision.v1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() {
if (imagePropertiesAnnotationBuilder_ != null) {
return imagePropertiesAnnotationBuilder_.getMessageOrBuilder();
} else {
return imagePropertiesAnnotation_ == null ?
com.google.cloud.vision.v1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_;
}
}
/**
*
* If present, image properties were extracted successfully.
*
*
* optional .google.cloud.vision.v1.ImageProperties image_properties_annotation = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder>
getImagePropertiesAnnotationFieldBuilder() {
if (imagePropertiesAnnotationBuilder_ == null) {
imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, com.google.cloud.vision.v1.ImagePropertiesOrBuilder>(
getImagePropertiesAnnotation(),
getParentForChildren(),
isClean());
imagePropertiesAnnotation_ = null;
}
return imagePropertiesAnnotationBuilder_;
}
private com.google.rpc.Status error_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_;
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public boolean hasError() {
return errorBuilder_ != null || error_ != null;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public com.google.rpc.Status getError() {
if (errorBuilder_ == null) {
return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
} else {
return errorBuilder_.getMessage();
}
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public Builder setError(com.google.rpc.Status value) {
if (errorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
error_ = value;
onChanged();
} else {
errorBuilder_.setMessage(value);
}
return this;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public Builder setError(
com.google.rpc.Status.Builder builderForValue) {
if (errorBuilder_ == null) {
error_ = builderForValue.build();
onChanged();
} else {
errorBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public Builder mergeError(com.google.rpc.Status value) {
if (errorBuilder_ == null) {
if (error_ != null) {
error_ =
com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial();
} else {
error_ = value;
}
onChanged();
} else {
errorBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public Builder clearError() {
if (errorBuilder_ == null) {
error_ = null;
onChanged();
} else {
error_ = null;
errorBuilder_ = null;
}
return this;
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public com.google.rpc.Status.Builder getErrorBuilder() {
onChanged();
return getErrorFieldBuilder().getBuilder();
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
if (errorBuilder_ != null) {
return errorBuilder_.getMessageOrBuilder();
} else {
return error_ == null ?
com.google.rpc.Status.getDefaultInstance() : error_;
}
}
/**
*
* If set, represents the error message for the operation.
* Note that filled-in mage annotations are guaranteed to be
* correct, even when <code>error</code> is non-empty.
*
*
* optional .google.rpc.Status error = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getErrorFieldBuilder() {
if (errorBuilder_ == null) {
errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(
getError(),
getParentForChildren(),
isClean());
error_ = null;
}
return errorBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:google.cloud.vision.v1.AnnotateImageResponse)
}
// @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageResponse)
private static final com.google.cloud.vision.v1.AnnotateImageResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.vision.v1.AnnotateImageResponse();
}
public static com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public AnnotateImageResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnnotateImageResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.vision.v1.AnnotateImageResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy