
com.google.cloud.visionai.v1.AnnotationValue Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/visionai/v1/warehouse.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* Value of annotation, including all types available in data schema.
*
*
* Protobuf type {@code google.cloud.visionai.v1.AnnotationValue}
*/
public final class AnnotationValue extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AnnotationValue)
AnnotationValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnnotationValue.newBuilder() to construct.
private AnnotationValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnnotationValue() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AnnotationValue();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_AnnotationValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AnnotationValue.class,
com.google.cloud.visionai.v1.AnnotationValue.Builder.class);
}
private int valueCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object value_;
public enum ValueCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INT_VALUE(1),
FLOAT_VALUE(2),
STR_VALUE(3),
DATETIME_VALUE(5),
GEO_COORDINATE(7),
PROTO_ANY_VALUE(8),
BOOL_VALUE(9),
CUSTOMIZED_STRUCT_DATA_VALUE(10),
LIST_VALUE(11),
CUSTOMIZED_STRUCT_VALUE(6),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 1:
return INT_VALUE;
case 2:
return FLOAT_VALUE;
case 3:
return STR_VALUE;
case 5:
return DATETIME_VALUE;
case 7:
return GEO_COORDINATE;
case 8:
return PROTO_ANY_VALUE;
case 9:
return BOOL_VALUE;
case 10:
return CUSTOMIZED_STRUCT_DATA_VALUE;
case 11:
return LIST_VALUE;
case 6:
return CUSTOMIZED_STRUCT_VALUE;
case 0:
return VALUE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase getValueCase() {
return ValueCase.forNumber(valueCase_);
}
public static final int INT_VALUE_FIELD_NUMBER = 1;
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @return Whether the intValue field is set.
*/
@java.lang.Override
public boolean hasIntValue() {
return valueCase_ == 1;
}
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @return The intValue.
*/
@java.lang.Override
public long getIntValue() {
if (valueCase_ == 1) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int FLOAT_VALUE_FIELD_NUMBER = 2;
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @return Whether the floatValue field is set.
*/
@java.lang.Override
public boolean hasFloatValue() {
return valueCase_ == 2;
}
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @return The floatValue.
*/
@java.lang.Override
public float getFloatValue() {
if (valueCase_ == 2) {
return (java.lang.Float) value_;
}
return 0F;
}
public static final int STR_VALUE_FIELD_NUMBER = 3;
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return Whether the strValue field is set.
*/
public boolean hasStrValue() {
return valueCase_ == 3;
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return The strValue.
*/
public java.lang.String getStrValue() {
java.lang.Object ref = "";
if (valueCase_ == 3) {
ref = value_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 3) {
value_ = s;
}
return s;
}
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return The bytes for strValue.
*/
public com.google.protobuf.ByteString getStrValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 3) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueCase_ == 3) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATETIME_VALUE_FIELD_NUMBER = 5;
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return Whether the datetimeValue field is set.
*/
public boolean hasDatetimeValue() {
return valueCase_ == 5;
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return The datetimeValue.
*/
public java.lang.String getDatetimeValue() {
java.lang.Object ref = "";
if (valueCase_ == 5) {
ref = value_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 5) {
value_ = s;
}
return s;
}
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return The bytes for datetimeValue.
*/
public com.google.protobuf.ByteString getDatetimeValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 5) {
ref = value_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueCase_ == 5) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GEO_COORDINATE_FIELD_NUMBER = 7;
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*
* @return Whether the geoCoordinate field is set.
*/
@java.lang.Override
public boolean hasGeoCoordinate() {
return valueCase_ == 7;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*
* @return The geoCoordinate.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.GeoCoordinate getGeoCoordinate() {
if (valueCase_ == 7) {
return (com.google.cloud.visionai.v1.GeoCoordinate) value_;
}
return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.GeoCoordinateOrBuilder getGeoCoordinateOrBuilder() {
if (valueCase_ == 7) {
return (com.google.cloud.visionai.v1.GeoCoordinate) value_;
}
return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
}
public static final int PROTO_ANY_VALUE_FIELD_NUMBER = 8;
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*
* @return Whether the protoAnyValue field is set.
*/
@java.lang.Override
public boolean hasProtoAnyValue() {
return valueCase_ == 8;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*
* @return The protoAnyValue.
*/
@java.lang.Override
public com.google.protobuf.Any getProtoAnyValue() {
if (valueCase_ == 8) {
return (com.google.protobuf.Any) value_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getProtoAnyValueOrBuilder() {
if (valueCase_ == 8) {
return (com.google.protobuf.Any) value_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
public static final int BOOL_VALUE_FIELD_NUMBER = 9;
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @return Whether the boolValue field is set.
*/
@java.lang.Override
public boolean hasBoolValue() {
return valueCase_ == 9;
}
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
if (valueCase_ == 9) {
return (java.lang.Boolean) value_;
}
return false;
}
public static final int CUSTOMIZED_STRUCT_DATA_VALUE_FIELD_NUMBER = 10;
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*
* @return Whether the customizedStructDataValue field is set.
*/
@java.lang.Override
public boolean hasCustomizedStructDataValue() {
return valueCase_ == 10;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*
* @return The customizedStructDataValue.
*/
@java.lang.Override
public com.google.protobuf.Struct getCustomizedStructDataValue() {
if (valueCase_ == 10) {
return (com.google.protobuf.Struct) value_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getCustomizedStructDataValueOrBuilder() {
if (valueCase_ == 10) {
return (com.google.protobuf.Struct) value_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
public static final int LIST_VALUE_FIELD_NUMBER = 11;
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return valueCase_ == 11;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*
* @return The listValue.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationList getListValue() {
if (valueCase_ == 11) {
return (com.google.cloud.visionai.v1.AnnotationList) value_;
}
return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationListOrBuilder getListValueOrBuilder() {
if (valueCase_ == 11) {
return (com.google.cloud.visionai.v1.AnnotationList) value_;
}
return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
}
public static final int CUSTOMIZED_STRUCT_VALUE_FIELD_NUMBER = 6;
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
* @return Whether the customizedStructValue field is set.
*/
@java.lang.Override
public boolean hasCustomizedStructValue() {
return valueCase_ == 6;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
* @return The customizedStructValue.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationCustomizedStruct getCustomizedStructValue() {
if (valueCase_ == 6) {
return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_;
}
return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder
getCustomizedStructValueOrBuilder() {
if (valueCase_ == 6) {
return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_;
}
return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (valueCase_ == 1) {
output.writeInt64(1, (long) ((java.lang.Long) value_));
}
if (valueCase_ == 2) {
output.writeFloat(2, (float) ((java.lang.Float) value_));
}
if (valueCase_ == 3) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_);
}
if (valueCase_ == 5) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_);
}
if (valueCase_ == 6) {
output.writeMessage(6, (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_);
}
if (valueCase_ == 7) {
output.writeMessage(7, (com.google.cloud.visionai.v1.GeoCoordinate) value_);
}
if (valueCase_ == 8) {
output.writeMessage(8, (com.google.protobuf.Any) value_);
}
if (valueCase_ == 9) {
output.writeBool(9, (boolean) ((java.lang.Boolean) value_));
}
if (valueCase_ == 10) {
output.writeMessage(10, (com.google.protobuf.Struct) value_);
}
if (valueCase_ == 11) {
output.writeMessage(11, (com.google.cloud.visionai.v1.AnnotationList) value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeInt64Size(
1, (long) ((java.lang.Long) value_));
}
if (valueCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeFloatSize(
2, (float) ((java.lang.Float) value_));
}
if (valueCase_ == 3) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_);
}
if (valueCase_ == 5) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_);
}
if (valueCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_);
}
if (valueCase_ == 7) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, (com.google.cloud.visionai.v1.GeoCoordinate) value_);
}
if (valueCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.protobuf.Any) value_);
}
if (valueCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
9, (boolean) ((java.lang.Boolean) value_));
}
if (valueCase_ == 10) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
10, (com.google.protobuf.Struct) value_);
}
if (valueCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
11, (com.google.cloud.visionai.v1.AnnotationList) value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.visionai.v1.AnnotationValue)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.AnnotationValue other =
(com.google.cloud.visionai.v1.AnnotationValue) obj;
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 1:
if (getIntValue() != other.getIntValue()) return false;
break;
case 2:
if (java.lang.Float.floatToIntBits(getFloatValue())
!= java.lang.Float.floatToIntBits(other.getFloatValue())) return false;
break;
case 3:
if (!getStrValue().equals(other.getStrValue())) return false;
break;
case 5:
if (!getDatetimeValue().equals(other.getDatetimeValue())) return false;
break;
case 7:
if (!getGeoCoordinate().equals(other.getGeoCoordinate())) return false;
break;
case 8:
if (!getProtoAnyValue().equals(other.getProtoAnyValue())) return false;
break;
case 9:
if (getBoolValue() != other.getBoolValue()) return false;
break;
case 10:
if (!getCustomizedStructDataValue().equals(other.getCustomizedStructDataValue()))
return false;
break;
case 11:
if (!getListValue().equals(other.getListValue())) return false;
break;
case 6:
if (!getCustomizedStructValue().equals(other.getCustomizedStructValue())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
switch (valueCase_) {
case 1:
hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIntValue());
break;
case 2:
hash = (37 * hash) + FLOAT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getFloatValue());
break;
case 3:
hash = (37 * hash) + STR_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStrValue().hashCode();
break;
case 5:
hash = (37 * hash) + DATETIME_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDatetimeValue().hashCode();
break;
case 7:
hash = (37 * hash) + GEO_COORDINATE_FIELD_NUMBER;
hash = (53 * hash) + getGeoCoordinate().hashCode();
break;
case 8:
hash = (37 * hash) + PROTO_ANY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getProtoAnyValue().hashCode();
break;
case 9:
hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBoolValue());
break;
case 10:
hash = (37 * hash) + CUSTOMIZED_STRUCT_DATA_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getCustomizedStructDataValue().hashCode();
break;
case 11:
hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 6:
hash = (37 * hash) + CUSTOMIZED_STRUCT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getCustomizedStructValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AnnotationValue 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.visionai.v1.AnnotationValue parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AnnotationValue parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.visionai.v1.AnnotationValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Value of annotation, including all types available in data schema.
*
*
* Protobuf type {@code google.cloud.visionai.v1.AnnotationValue}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AnnotationValue)
com.google.cloud.visionai.v1.AnnotationValueOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_AnnotationValue_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AnnotationValue.class,
com.google.cloud.visionai.v1.AnnotationValue.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.AnnotationValue.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (geoCoordinateBuilder_ != null) {
geoCoordinateBuilder_.clear();
}
if (protoAnyValueBuilder_ != null) {
protoAnyValueBuilder_.clear();
}
if (customizedStructDataValueBuilder_ != null) {
customizedStructDataValueBuilder_.clear();
}
if (listValueBuilder_ != null) {
listValueBuilder_.clear();
}
if (customizedStructValueBuilder_ != null) {
customizedStructValueBuilder_.clear();
}
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.WarehouseProto
.internal_static_google_cloud_visionai_v1_AnnotationValue_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationValue getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationValue build() {
com.google.cloud.visionai.v1.AnnotationValue result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationValue buildPartial() {
com.google.cloud.visionai.v1.AnnotationValue result =
new com.google.cloud.visionai.v1.AnnotationValue(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.visionai.v1.AnnotationValue result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.google.cloud.visionai.v1.AnnotationValue result) {
result.valueCase_ = valueCase_;
result.value_ = this.value_;
if (valueCase_ == 7 && geoCoordinateBuilder_ != null) {
result.value_ = geoCoordinateBuilder_.build();
}
if (valueCase_ == 8 && protoAnyValueBuilder_ != null) {
result.value_ = protoAnyValueBuilder_.build();
}
if (valueCase_ == 10 && customizedStructDataValueBuilder_ != null) {
result.value_ = customizedStructDataValueBuilder_.build();
}
if (valueCase_ == 11 && listValueBuilder_ != null) {
result.value_ = listValueBuilder_.build();
}
if (valueCase_ == 6 && customizedStructValueBuilder_ != null) {
result.value_ = customizedStructValueBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.visionai.v1.AnnotationValue) {
return mergeFrom((com.google.cloud.visionai.v1.AnnotationValue) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.AnnotationValue other) {
if (other == com.google.cloud.visionai.v1.AnnotationValue.getDefaultInstance()) return this;
switch (other.getValueCase()) {
case INT_VALUE:
{
setIntValue(other.getIntValue());
break;
}
case FLOAT_VALUE:
{
setFloatValue(other.getFloatValue());
break;
}
case STR_VALUE:
{
valueCase_ = 3;
value_ = other.value_;
onChanged();
break;
}
case DATETIME_VALUE:
{
valueCase_ = 5;
value_ = other.value_;
onChanged();
break;
}
case GEO_COORDINATE:
{
mergeGeoCoordinate(other.getGeoCoordinate());
break;
}
case PROTO_ANY_VALUE:
{
mergeProtoAnyValue(other.getProtoAnyValue());
break;
}
case BOOL_VALUE:
{
setBoolValue(other.getBoolValue());
break;
}
case CUSTOMIZED_STRUCT_DATA_VALUE:
{
mergeCustomizedStructDataValue(other.getCustomizedStructDataValue());
break;
}
case LIST_VALUE:
{
mergeListValue(other.getListValue());
break;
}
case CUSTOMIZED_STRUCT_VALUE:
{
mergeCustomizedStructValue(other.getCustomizedStructValue());
break;
}
case VALUE_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
value_ = input.readInt64();
valueCase_ = 1;
break;
} // case 8
case 21:
{
value_ = input.readFloat();
valueCase_ = 2;
break;
} // case 21
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 3;
value_ = s;
break;
} // case 26
case 42:
{
java.lang.String s = input.readStringRequireUtf8();
valueCase_ = 5;
value_ = s;
break;
} // case 42
case 50:
{
input.readMessage(
getCustomizedStructValueFieldBuilder().getBuilder(), extensionRegistry);
valueCase_ = 6;
break;
} // case 50
case 58:
{
input.readMessage(getGeoCoordinateFieldBuilder().getBuilder(), extensionRegistry);
valueCase_ = 7;
break;
} // case 58
case 66:
{
input.readMessage(getProtoAnyValueFieldBuilder().getBuilder(), extensionRegistry);
valueCase_ = 8;
break;
} // case 66
case 72:
{
value_ = input.readBool();
valueCase_ = 9;
break;
} // case 72
case 82:
{
input.readMessage(
getCustomizedStructDataValueFieldBuilder().getBuilder(), extensionRegistry);
valueCase_ = 10;
break;
} // case 82
case 90:
{
input.readMessage(getListValueFieldBuilder().getBuilder(), extensionRegistry);
valueCase_ = 11;
break;
} // case 90
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int valueCase_ = 0;
private java.lang.Object value_;
public ValueCase getValueCase() {
return ValueCase.forNumber(valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @return Whether the intValue field is set.
*/
public boolean hasIntValue() {
return valueCase_ == 1;
}
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @return The intValue.
*/
public long getIntValue() {
if (valueCase_ == 1) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @param value The intValue to set.
* @return This builder for chaining.
*/
public Builder setIntValue(long value) {
valueCase_ = 1;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of int type annotation.
*
*
* int64 int_value = 1;
*
* @return This builder for chaining.
*/
public Builder clearIntValue() {
if (valueCase_ == 1) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @return Whether the floatValue field is set.
*/
public boolean hasFloatValue() {
return valueCase_ == 2;
}
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @return The floatValue.
*/
public float getFloatValue() {
if (valueCase_ == 2) {
return (java.lang.Float) value_;
}
return 0F;
}
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @param value The floatValue to set.
* @return This builder for chaining.
*/
public Builder setFloatValue(float value) {
valueCase_ = 2;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of float type annotation.
*
*
* float float_value = 2;
*
* @return This builder for chaining.
*/
public Builder clearFloatValue() {
if (valueCase_ == 2) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return Whether the strValue field is set.
*/
@java.lang.Override
public boolean hasStrValue() {
return valueCase_ == 3;
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return The strValue.
*/
@java.lang.Override
public java.lang.String getStrValue() {
java.lang.Object ref = "";
if (valueCase_ == 3) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 3) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return The bytes for strValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStrValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 3) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueCase_ == 3) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @param value The strValue to set.
* @return This builder for chaining.
*/
public Builder setStrValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 3;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @return This builder for chaining.
*/
public Builder clearStrValue() {
if (valueCase_ == 3) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Value of string type annotation.
*
*
* string str_value = 3;
*
* @param value The bytes for strValue to set.
* @return This builder for chaining.
*/
public Builder setStrValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 3;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return Whether the datetimeValue field is set.
*/
@java.lang.Override
public boolean hasDatetimeValue() {
return valueCase_ == 5;
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return The datetimeValue.
*/
@java.lang.Override
public java.lang.String getDatetimeValue() {
java.lang.Object ref = "";
if (valueCase_ == 5) {
ref = value_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (valueCase_ == 5) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return The bytes for datetimeValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDatetimeValueBytes() {
java.lang.Object ref = "";
if (valueCase_ == 5) {
ref = value_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (valueCase_ == 5) {
value_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @param value The datetimeValue to set.
* @return This builder for chaining.
*/
public Builder setDatetimeValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
valueCase_ = 5;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @return This builder for chaining.
*/
public Builder clearDatetimeValue() {
if (valueCase_ == 5) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Value of date time type annotation.
*
*
* string datetime_value = 5;
*
* @param value The bytes for datetimeValue to set.
* @return This builder for chaining.
*/
public Builder setDatetimeValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
valueCase_ = 5;
value_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.GeoCoordinate,
com.google.cloud.visionai.v1.GeoCoordinate.Builder,
com.google.cloud.visionai.v1.GeoCoordinateOrBuilder>
geoCoordinateBuilder_;
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*
* @return Whether the geoCoordinate field is set.
*/
@java.lang.Override
public boolean hasGeoCoordinate() {
return valueCase_ == 7;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*
* @return The geoCoordinate.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.GeoCoordinate getGeoCoordinate() {
if (geoCoordinateBuilder_ == null) {
if (valueCase_ == 7) {
return (com.google.cloud.visionai.v1.GeoCoordinate) value_;
}
return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
} else {
if (valueCase_ == 7) {
return geoCoordinateBuilder_.getMessage();
}
return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
}
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
public Builder setGeoCoordinate(com.google.cloud.visionai.v1.GeoCoordinate value) {
if (geoCoordinateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
geoCoordinateBuilder_.setMessage(value);
}
valueCase_ = 7;
return this;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
public Builder setGeoCoordinate(
com.google.cloud.visionai.v1.GeoCoordinate.Builder builderForValue) {
if (geoCoordinateBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
geoCoordinateBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 7;
return this;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
public Builder mergeGeoCoordinate(com.google.cloud.visionai.v1.GeoCoordinate value) {
if (geoCoordinateBuilder_ == null) {
if (valueCase_ == 7
&& value_ != com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance()) {
value_ =
com.google.cloud.visionai.v1.GeoCoordinate.newBuilder(
(com.google.cloud.visionai.v1.GeoCoordinate) value_)
.mergeFrom(value)
.buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 7) {
geoCoordinateBuilder_.mergeFrom(value);
} else {
geoCoordinateBuilder_.setMessage(value);
}
}
valueCase_ = 7;
return this;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
public Builder clearGeoCoordinate() {
if (geoCoordinateBuilder_ == null) {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
}
geoCoordinateBuilder_.clear();
}
return this;
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
public com.google.cloud.visionai.v1.GeoCoordinate.Builder getGeoCoordinateBuilder() {
return getGeoCoordinateFieldBuilder().getBuilder();
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.GeoCoordinateOrBuilder getGeoCoordinateOrBuilder() {
if ((valueCase_ == 7) && (geoCoordinateBuilder_ != null)) {
return geoCoordinateBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 7) {
return (com.google.cloud.visionai.v1.GeoCoordinate) value_;
}
return com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
}
}
/**
*
*
*
* Value of geo coordinate type annotation.
*
*
* .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.GeoCoordinate,
com.google.cloud.visionai.v1.GeoCoordinate.Builder,
com.google.cloud.visionai.v1.GeoCoordinateOrBuilder>
getGeoCoordinateFieldBuilder() {
if (geoCoordinateBuilder_ == null) {
if (!(valueCase_ == 7)) {
value_ = com.google.cloud.visionai.v1.GeoCoordinate.getDefaultInstance();
}
geoCoordinateBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.GeoCoordinate,
com.google.cloud.visionai.v1.GeoCoordinate.Builder,
com.google.cloud.visionai.v1.GeoCoordinateOrBuilder>(
(com.google.cloud.visionai.v1.GeoCoordinate) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 7;
onChanged();
return geoCoordinateBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any,
com.google.protobuf.Any.Builder,
com.google.protobuf.AnyOrBuilder>
protoAnyValueBuilder_;
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*
* @return Whether the protoAnyValue field is set.
*/
@java.lang.Override
public boolean hasProtoAnyValue() {
return valueCase_ == 8;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*
* @return The protoAnyValue.
*/
@java.lang.Override
public com.google.protobuf.Any getProtoAnyValue() {
if (protoAnyValueBuilder_ == null) {
if (valueCase_ == 8) {
return (com.google.protobuf.Any) value_;
}
return com.google.protobuf.Any.getDefaultInstance();
} else {
if (valueCase_ == 8) {
return protoAnyValueBuilder_.getMessage();
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
public Builder setProtoAnyValue(com.google.protobuf.Any value) {
if (protoAnyValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
protoAnyValueBuilder_.setMessage(value);
}
valueCase_ = 8;
return this;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
public Builder setProtoAnyValue(com.google.protobuf.Any.Builder builderForValue) {
if (protoAnyValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
protoAnyValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 8;
return this;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
public Builder mergeProtoAnyValue(com.google.protobuf.Any value) {
if (protoAnyValueBuilder_ == null) {
if (valueCase_ == 8 && value_ != com.google.protobuf.Any.getDefaultInstance()) {
value_ =
com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) value_)
.mergeFrom(value)
.buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 8) {
protoAnyValueBuilder_.mergeFrom(value);
} else {
protoAnyValueBuilder_.setMessage(value);
}
}
valueCase_ = 8;
return this;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
public Builder clearProtoAnyValue() {
if (protoAnyValueBuilder_ == null) {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 8) {
valueCase_ = 0;
value_ = null;
}
protoAnyValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
public com.google.protobuf.Any.Builder getProtoAnyValueBuilder() {
return getProtoAnyValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getProtoAnyValueOrBuilder() {
if ((valueCase_ == 8) && (protoAnyValueBuilder_ != null)) {
return protoAnyValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 8) {
return (com.google.protobuf.Any) value_;
}
return com.google.protobuf.Any.getDefaultInstance();
}
}
/**
*
*
*
* Value of any proto value.
*
*
* .google.protobuf.Any proto_any_value = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any,
com.google.protobuf.Any.Builder,
com.google.protobuf.AnyOrBuilder>
getProtoAnyValueFieldBuilder() {
if (protoAnyValueBuilder_ == null) {
if (!(valueCase_ == 8)) {
value_ = com.google.protobuf.Any.getDefaultInstance();
}
protoAnyValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Any,
com.google.protobuf.Any.Builder,
com.google.protobuf.AnyOrBuilder>(
(com.google.protobuf.Any) value_, getParentForChildren(), isClean());
value_ = null;
}
valueCase_ = 8;
onChanged();
return protoAnyValueBuilder_;
}
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @return Whether the boolValue field is set.
*/
public boolean hasBoolValue() {
return valueCase_ == 9;
}
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @return The boolValue.
*/
public boolean getBoolValue() {
if (valueCase_ == 9) {
return (java.lang.Boolean) value_;
}
return false;
}
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @param value The boolValue to set.
* @return This builder for chaining.
*/
public Builder setBoolValue(boolean value) {
valueCase_ = 9;
value_ = value;
onChanged();
return this;
}
/**
*
*
*
* Value of boolean type annotation.
*
*
* bool bool_value = 9;
*
* @return This builder for chaining.
*/
public Builder clearBoolValue() {
if (valueCase_ == 9) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
customizedStructDataValueBuilder_;
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*
* @return Whether the customizedStructDataValue field is set.
*/
@java.lang.Override
public boolean hasCustomizedStructDataValue() {
return valueCase_ == 10;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*
* @return The customizedStructDataValue.
*/
@java.lang.Override
public com.google.protobuf.Struct getCustomizedStructDataValue() {
if (customizedStructDataValueBuilder_ == null) {
if (valueCase_ == 10) {
return (com.google.protobuf.Struct) value_;
}
return com.google.protobuf.Struct.getDefaultInstance();
} else {
if (valueCase_ == 10) {
return customizedStructDataValueBuilder_.getMessage();
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
public Builder setCustomizedStructDataValue(com.google.protobuf.Struct value) {
if (customizedStructDataValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
customizedStructDataValueBuilder_.setMessage(value);
}
valueCase_ = 10;
return this;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
public Builder setCustomizedStructDataValue(
com.google.protobuf.Struct.Builder builderForValue) {
if (customizedStructDataValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
customizedStructDataValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 10;
return this;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
public Builder mergeCustomizedStructDataValue(com.google.protobuf.Struct value) {
if (customizedStructDataValueBuilder_ == null) {
if (valueCase_ == 10 && value_ != com.google.protobuf.Struct.getDefaultInstance()) {
value_ =
com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) value_)
.mergeFrom(value)
.buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 10) {
customizedStructDataValueBuilder_.mergeFrom(value);
} else {
customizedStructDataValueBuilder_.setMessage(value);
}
}
valueCase_ = 10;
return this;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
public Builder clearCustomizedStructDataValue() {
if (customizedStructDataValueBuilder_ == null) {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 10) {
valueCase_ = 0;
value_ = null;
}
customizedStructDataValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
public com.google.protobuf.Struct.Builder getCustomizedStructDataValueBuilder() {
return getCustomizedStructDataValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getCustomizedStructDataValueOrBuilder() {
if ((valueCase_ == 10) && (customizedStructDataValueBuilder_ != null)) {
return customizedStructDataValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 10) {
return (com.google.protobuf.Struct) value_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
*
*
* Value of customized struct annotation. This field does not have effects.
* Use customized_struct_value instead for customized struct annotation.
*
*
* .google.protobuf.Struct customized_struct_data_value = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getCustomizedStructDataValueFieldBuilder() {
if (customizedStructDataValueBuilder_ == null) {
if (!(valueCase_ == 10)) {
value_ = com.google.protobuf.Struct.getDefaultInstance();
}
customizedStructDataValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
(com.google.protobuf.Struct) value_, getParentForChildren(), isClean());
value_ = null;
}
valueCase_ = 10;
onChanged();
return customizedStructDataValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationList,
com.google.cloud.visionai.v1.AnnotationList.Builder,
com.google.cloud.visionai.v1.AnnotationListOrBuilder>
listValueBuilder_;
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return valueCase_ == 11;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*
* @return The listValue.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationList getListValue() {
if (listValueBuilder_ == null) {
if (valueCase_ == 11) {
return (com.google.cloud.visionai.v1.AnnotationList) value_;
}
return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
} else {
if (valueCase_ == 11) {
return listValueBuilder_.getMessage();
}
return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
}
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
public Builder setListValue(com.google.cloud.visionai.v1.AnnotationList value) {
if (listValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
listValueBuilder_.setMessage(value);
}
valueCase_ = 11;
return this;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
public Builder setListValue(
com.google.cloud.visionai.v1.AnnotationList.Builder builderForValue) {
if (listValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
listValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 11;
return this;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
public Builder mergeListValue(com.google.cloud.visionai.v1.AnnotationList value) {
if (listValueBuilder_ == null) {
if (valueCase_ == 11
&& value_ != com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance()) {
value_ =
com.google.cloud.visionai.v1.AnnotationList.newBuilder(
(com.google.cloud.visionai.v1.AnnotationList) value_)
.mergeFrom(value)
.buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 11) {
listValueBuilder_.mergeFrom(value);
} else {
listValueBuilder_.setMessage(value);
}
}
valueCase_ = 11;
return this;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
public Builder clearListValue() {
if (listValueBuilder_ == null) {
if (valueCase_ == 11) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 11) {
valueCase_ = 0;
value_ = null;
}
listValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
public com.google.cloud.visionai.v1.AnnotationList.Builder getListValueBuilder() {
return getListValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationListOrBuilder getListValueOrBuilder() {
if ((valueCase_ == 11) && (listValueBuilder_ != null)) {
return listValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 11) {
return (com.google.cloud.visionai.v1.AnnotationList) value_;
}
return com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
}
}
/**
*
*
*
* Value of list type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationList list_value = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationList,
com.google.cloud.visionai.v1.AnnotationList.Builder,
com.google.cloud.visionai.v1.AnnotationListOrBuilder>
getListValueFieldBuilder() {
if (listValueBuilder_ == null) {
if (!(valueCase_ == 11)) {
value_ = com.google.cloud.visionai.v1.AnnotationList.getDefaultInstance();
}
listValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationList,
com.google.cloud.visionai.v1.AnnotationList.Builder,
com.google.cloud.visionai.v1.AnnotationListOrBuilder>(
(com.google.cloud.visionai.v1.AnnotationList) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 11;
onChanged();
return listValueBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationCustomizedStruct,
com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder,
com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder>
customizedStructValueBuilder_;
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*
* @return Whether the customizedStructValue field is set.
*/
@java.lang.Override
public boolean hasCustomizedStructValue() {
return valueCase_ == 6;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*
* @return The customizedStructValue.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationCustomizedStruct getCustomizedStructValue() {
if (customizedStructValueBuilder_ == null) {
if (valueCase_ == 6) {
return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_;
}
return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
} else {
if (valueCase_ == 6) {
return customizedStructValueBuilder_.getMessage();
}
return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
}
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
public Builder setCustomizedStructValue(
com.google.cloud.visionai.v1.AnnotationCustomizedStruct value) {
if (customizedStructValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
} else {
customizedStructValueBuilder_.setMessage(value);
}
valueCase_ = 6;
return this;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
public Builder setCustomizedStructValue(
com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder builderForValue) {
if (customizedStructValueBuilder_ == null) {
value_ = builderForValue.build();
onChanged();
} else {
customizedStructValueBuilder_.setMessage(builderForValue.build());
}
valueCase_ = 6;
return this;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
public Builder mergeCustomizedStructValue(
com.google.cloud.visionai.v1.AnnotationCustomizedStruct value) {
if (customizedStructValueBuilder_ == null) {
if (valueCase_ == 6
&& value_
!= com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance()) {
value_ =
com.google.cloud.visionai.v1.AnnotationCustomizedStruct.newBuilder(
(com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_)
.mergeFrom(value)
.buildPartial();
} else {
value_ = value;
}
onChanged();
} else {
if (valueCase_ == 6) {
customizedStructValueBuilder_.mergeFrom(value);
} else {
customizedStructValueBuilder_.setMessage(value);
}
}
valueCase_ = 6;
return this;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
public Builder clearCustomizedStructValue() {
if (customizedStructValueBuilder_ == null) {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
onChanged();
}
} else {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
}
customizedStructValueBuilder_.clear();
}
return this;
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
public com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder
getCustomizedStructValueBuilder() {
return getCustomizedStructValueFieldBuilder().getBuilder();
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder
getCustomizedStructValueOrBuilder() {
if ((valueCase_ == 6) && (customizedStructValueBuilder_ != null)) {
return customizedStructValueBuilder_.getMessageOrBuilder();
} else {
if (valueCase_ == 6) {
return (com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_;
}
return com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
}
}
/**
*
*
*
* Value of custom struct type annotation.
*
*
* .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationCustomizedStruct,
com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder,
com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder>
getCustomizedStructValueFieldBuilder() {
if (customizedStructValueBuilder_ == null) {
if (!(valueCase_ == 6)) {
value_ = com.google.cloud.visionai.v1.AnnotationCustomizedStruct.getDefaultInstance();
}
customizedStructValueBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AnnotationCustomizedStruct,
com.google.cloud.visionai.v1.AnnotationCustomizedStruct.Builder,
com.google.cloud.visionai.v1.AnnotationCustomizedStructOrBuilder>(
(com.google.cloud.visionai.v1.AnnotationCustomizedStruct) value_,
getParentForChildren(),
isClean());
value_ = null;
}
valueCase_ = 6;
onChanged();
return customizedStructValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.AnnotationValue)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AnnotationValue)
private static final com.google.cloud.visionai.v1.AnnotationValue DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AnnotationValue();
}
public static com.google.cloud.visionai.v1.AnnotationValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnnotationValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AnnotationValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy