org.apache.comet.shaded.protobuf.Value Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/struct.proto
package org.apache.comet.shaded.protobuf;
/**
*
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of these
* variants. Absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
*
* Protobuf type {@code google.protobuf.Value}
*/
public final class Value extends
org.apache.comet.shaded.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.protobuf.Value)
ValueOrBuilder {
private static final long serialVersionUID = 0L;
// Use Value.newBuilder() to construct.
private Value(org.apache.comet.shaded.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Value() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Value();
}
@java.lang.Override
public final org.apache.comet.shaded.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final org.apache.comet.shaded.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.comet.shaded.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
@java.lang.Override
protected org.apache.comet.shaded.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.comet.shaded.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.comet.shaded.protobuf.Value.class, org.apache.comet.shaded.protobuf.Value.Builder.class);
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public enum KindCase
implements org.apache.comet.shaded.protobuf.Internal.EnumLite,
org.apache.comet.shaded.protobuf.AbstractMessage.InternalOneOfEnum {
NULL_VALUE(1),
NUMBER_VALUE(2),
STRING_VALUE(3),
BOOL_VALUE(4),
STRUCT_VALUE(5),
LIST_VALUE(6),
KIND_NOT_SET(0);
private final int value;
private KindCase(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 KindCase valueOf(int value) {
return forNumber(value);
}
public static KindCase forNumber(int value) {
switch (value) {
case 1: return NULL_VALUE;
case 2: return NUMBER_VALUE;
case 3: return STRING_VALUE;
case 4: return BOOL_VALUE;
case 5: return STRUCT_VALUE;
case 6: return LIST_VALUE;
case 0: return KIND_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public static final int NULL_VALUE_FIELD_NUMBER = 1;
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return Whether the nullValue field is set.
*/
public boolean hasNullValue() {
return kindCase_ == 1;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The enum numeric value on the wire for nullValue.
*/
public int getNullValueValue() {
if (kindCase_ == 1) {
return (java.lang.Integer) kind_;
}
return 0;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The nullValue.
*/
public org.apache.comet.shaded.protobuf.NullValue getNullValue() {
if (kindCase_ == 1) {
@SuppressWarnings("deprecation")
org.apache.comet.shaded.protobuf.NullValue result = org.apache.comet.shaded.protobuf.NullValue.valueOf(
(java.lang.Integer) kind_);
return result == null ? org.apache.comet.shaded.protobuf.NullValue.UNRECOGNIZED : result;
}
return org.apache.comet.shaded.protobuf.NullValue.NULL_VALUE;
}
public static final int NUMBER_VALUE_FIELD_NUMBER = 2;
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @return Whether the numberValue field is set.
*/
@java.lang.Override
public boolean hasNumberValue() {
return kindCase_ == 2;
}
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @return The numberValue.
*/
@java.lang.Override
public double getNumberValue() {
if (kindCase_ == 2) {
return (java.lang.Double) kind_;
}
return 0D;
}
public static final int STRING_VALUE_FIELD_NUMBER = 3;
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return Whether the stringValue field is set.
*/
public boolean hasStringValue() {
return kindCase_ == 3;
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return The stringValue.
*/
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 3) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
org.apache.comet.shaded.protobuf.ByteString bs =
(org.apache.comet.shaded.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 3) {
kind_ = s;
}
return s;
}
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return The bytes for stringValue.
*/
public org.apache.comet.shaded.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 3) {
ref = kind_;
}
if (ref instanceof java.lang.String) {
org.apache.comet.shaded.protobuf.ByteString b =
org.apache.comet.shaded.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 3) {
kind_ = b;
}
return b;
} else {
return (org.apache.comet.shaded.protobuf.ByteString) ref;
}
}
public static final int BOOL_VALUE_FIELD_NUMBER = 4;
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @return Whether the boolValue field is set.
*/
@java.lang.Override
public boolean hasBoolValue() {
return kindCase_ == 4;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @return The boolValue.
*/
@java.lang.Override
public boolean getBoolValue() {
if (kindCase_ == 4) {
return (java.lang.Boolean) kind_;
}
return false;
}
public static final int STRUCT_VALUE_FIELD_NUMBER = 5;
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
* @return Whether the structValue field is set.
*/
@java.lang.Override
public boolean hasStructValue() {
return kindCase_ == 5;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
* @return The structValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.Struct getStructValue() {
if (kindCase_ == 5) {
return (org.apache.comet.shaded.protobuf.Struct) kind_;
}
return org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.StructOrBuilder getStructValueOrBuilder() {
if (kindCase_ == 5) {
return (org.apache.comet.shaded.protobuf.Struct) kind_;
}
return org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
}
public static final int LIST_VALUE_FIELD_NUMBER = 6;
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return kindCase_ == 6;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
* @return The listValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.ListValue getListValue() {
if (kindCase_ == 6) {
return (org.apache.comet.shaded.protobuf.ListValue) kind_;
}
return org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance();
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.ListValueOrBuilder getListValueOrBuilder() {
if (kindCase_ == 6) {
return (org.apache.comet.shaded.protobuf.ListValue) kind_;
}
return org.apache.comet.shaded.protobuf.ListValue.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(org.apache.comet.shaded.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (kindCase_ == 1) {
output.writeEnum(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
output.writeDouble(
2, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 3) {
org.apache.comet.shaded.protobuf.GeneratedMessageV3.writeString(output, 3, kind_);
}
if (kindCase_ == 4) {
output.writeBool(
4, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 5) {
output.writeMessage(5, (org.apache.comet.shaded.protobuf.Struct) kind_);
}
if (kindCase_ == 6) {
output.writeMessage(6, (org.apache.comet.shaded.protobuf.ListValue) kind_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kindCase_ == 1) {
size += org.apache.comet.shaded.protobuf.CodedOutputStream
.computeEnumSize(1, ((java.lang.Integer) kind_));
}
if (kindCase_ == 2) {
size += org.apache.comet.shaded.protobuf.CodedOutputStream
.computeDoubleSize(
2, (double)((java.lang.Double) kind_));
}
if (kindCase_ == 3) {
size += org.apache.comet.shaded.protobuf.GeneratedMessageV3.computeStringSize(3, kind_);
}
if (kindCase_ == 4) {
size += org.apache.comet.shaded.protobuf.CodedOutputStream
.computeBoolSize(
4, (boolean)((java.lang.Boolean) kind_));
}
if (kindCase_ == 5) {
size += org.apache.comet.shaded.protobuf.CodedOutputStream
.computeMessageSize(5, (org.apache.comet.shaded.protobuf.Struct) kind_);
}
if (kindCase_ == 6) {
size += org.apache.comet.shaded.protobuf.CodedOutputStream
.computeMessageSize(6, (org.apache.comet.shaded.protobuf.ListValue) kind_);
}
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 org.apache.comet.shaded.protobuf.Value)) {
return super.equals(obj);
}
org.apache.comet.shaded.protobuf.Value other = (org.apache.comet.shaded.protobuf.Value) obj;
if (!getKindCase().equals(other.getKindCase())) return false;
switch (kindCase_) {
case 1:
if (getNullValueValue()
!= other.getNullValueValue()) return false;
break;
case 2:
if (java.lang.Double.doubleToLongBits(getNumberValue())
!= java.lang.Double.doubleToLongBits(
other.getNumberValue())) return false;
break;
case 3:
if (!getStringValue()
.equals(other.getStringValue())) return false;
break;
case 4:
if (getBoolValue()
!= other.getBoolValue()) return false;
break;
case 5:
if (!getStructValue()
.equals(other.getStructValue())) return false;
break;
case 6:
if (!getListValue()
.equals(other.getListValue())) 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 (kindCase_) {
case 1:
hash = (37 * hash) + NULL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getNullValueValue();
break;
case 2:
hash = (37 * hash) + NUMBER_VALUE_FIELD_NUMBER;
hash = (53 * hash) + org.apache.comet.shaded.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getNumberValue()));
break;
case 3:
hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStringValue().hashCode();
break;
case 4:
hash = (37 * hash) + BOOL_VALUE_FIELD_NUMBER;
hash = (53 * hash) + org.apache.comet.shaded.protobuf.Internal.hashBoolean(
getBoolValue());
break;
case 5:
hash = (37 * hash) + STRUCT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getStructValue().hashCode();
break;
case 6:
hash = (37 * hash) + LIST_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getListValue().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
java.nio.ByteBuffer data)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
java.nio.ByteBuffer data,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
org.apache.comet.shaded.protobuf.ByteString data)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
org.apache.comet.shaded.protobuf.ByteString data,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(byte[] data)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
byte[] data,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.apache.comet.shaded.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
java.io.InputStream input,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.comet.shaded.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.comet.shaded.protobuf.Value parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.apache.comet.shaded.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.comet.shaded.protobuf.Value parseDelimitedFrom(
java.io.InputStream input,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.comet.shaded.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
org.apache.comet.shaded.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.apache.comet.shaded.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.comet.shaded.protobuf.Value parseFrom(
org.apache.comet.shaded.protobuf.CodedInputStream input,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.comet.shaded.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(org.apache.comet.shaded.protobuf.Value 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(
org.apache.comet.shaded.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Value` represents a dynamically typed value which can be either
* null, a number, a string, a boolean, a recursive struct value, or a
* list of values. A producer of value is expected to set one of these
* variants. Absence of any variant indicates an error.
* The JSON representation for `Value` is JSON value.
*
*
* Protobuf type {@code google.protobuf.Value}
*/
public static final class Builder extends
org.apache.comet.shaded.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.protobuf.Value)
org.apache.comet.shaded.protobuf.ValueOrBuilder {
public static final org.apache.comet.shaded.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.comet.shaded.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
@java.lang.Override
protected org.apache.comet.shaded.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.comet.shaded.protobuf.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.comet.shaded.protobuf.Value.class, org.apache.comet.shaded.protobuf.Value.Builder.class);
}
// Construct using org.apache.comet.shaded.protobuf.Value.newBuilder()
private Builder() {
}
private Builder(
org.apache.comet.shaded.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
if (structValueBuilder_ != null) {
structValueBuilder_.clear();
}
if (listValueBuilder_ != null) {
listValueBuilder_.clear();
}
kindCase_ = 0;
kind_ = null;
return this;
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.comet.shaded.protobuf.StructProto.internal_static_google_protobuf_Value_descriptor;
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Value getDefaultInstanceForType() {
return org.apache.comet.shaded.protobuf.Value.getDefaultInstance();
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Value build() {
org.apache.comet.shaded.protobuf.Value result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Value buildPartial() {
org.apache.comet.shaded.protobuf.Value result = new org.apache.comet.shaded.protobuf.Value(this);
if (kindCase_ == 1) {
result.kind_ = kind_;
}
if (kindCase_ == 2) {
result.kind_ = kind_;
}
if (kindCase_ == 3) {
result.kind_ = kind_;
}
if (kindCase_ == 4) {
result.kind_ = kind_;
}
if (kindCase_ == 5) {
if (structValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = structValueBuilder_.build();
}
}
if (kindCase_ == 6) {
if (listValueBuilder_ == null) {
result.kind_ = kind_;
} else {
result.kind_ = listValueBuilder_.build();
}
}
result.kindCase_ = kindCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.apache.comet.shaded.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
org.apache.comet.shaded.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
org.apache.comet.shaded.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.apache.comet.shaded.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.apache.comet.shaded.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.apache.comet.shaded.protobuf.Message other) {
if (other instanceof org.apache.comet.shaded.protobuf.Value) {
return mergeFrom((org.apache.comet.shaded.protobuf.Value)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.comet.shaded.protobuf.Value other) {
if (other == org.apache.comet.shaded.protobuf.Value.getDefaultInstance()) return this;
switch (other.getKindCase()) {
case NULL_VALUE: {
setNullValueValue(other.getNullValueValue());
break;
}
case NUMBER_VALUE: {
setNumberValue(other.getNumberValue());
break;
}
case STRING_VALUE: {
kindCase_ = 3;
kind_ = other.kind_;
onChanged();
break;
}
case BOOL_VALUE: {
setBoolValue(other.getBoolValue());
break;
}
case STRUCT_VALUE: {
mergeStructValue(other.getStructValue());
break;
}
case LIST_VALUE: {
mergeListValue(other.getListValue());
break;
}
case KIND_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(
org.apache.comet.shaded.protobuf.CodedInputStream input,
org.apache.comet.shaded.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: {
int rawValue = input.readEnum();
kindCase_ = 1;
kind_ = rawValue;
break;
} // case 8
case 17: {
kind_ = input.readDouble();
kindCase_ = 2;
break;
} // case 17
case 26: {
java.lang.String s = input.readStringRequireUtf8();
kindCase_ = 3;
kind_ = s;
break;
} // case 26
case 32: {
kind_ = input.readBool();
kindCase_ = 4;
break;
} // case 32
case 42: {
input.readMessage(
getStructValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 5;
break;
} // case 42
case 50: {
input.readMessage(
getListValueFieldBuilder().getBuilder(),
extensionRegistry);
kindCase_ = 6;
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (org.apache.comet.shaded.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int kindCase_ = 0;
private java.lang.Object kind_;
public KindCase
getKindCase() {
return KindCase.forNumber(
kindCase_);
}
public Builder clearKind() {
kindCase_ = 0;
kind_ = null;
onChanged();
return this;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return Whether the nullValue field is set.
*/
@java.lang.Override
public boolean hasNullValue() {
return kindCase_ == 1;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The enum numeric value on the wire for nullValue.
*/
@java.lang.Override
public int getNullValueValue() {
if (kindCase_ == 1) {
return ((java.lang.Integer) kind_).intValue();
}
return 0;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @param value The enum numeric value on the wire for nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValueValue(int value) {
kindCase_ = 1;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return The nullValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.NullValue getNullValue() {
if (kindCase_ == 1) {
@SuppressWarnings("deprecation")
org.apache.comet.shaded.protobuf.NullValue result = org.apache.comet.shaded.protobuf.NullValue.valueOf(
(java.lang.Integer) kind_);
return result == null ? org.apache.comet.shaded.protobuf.NullValue.UNRECOGNIZED : result;
}
return org.apache.comet.shaded.protobuf.NullValue.NULL_VALUE;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @param value The nullValue to set.
* @return This builder for chaining.
*/
public Builder setNullValue(org.apache.comet.shaded.protobuf.NullValue value) {
if (value == null) {
throw new NullPointerException();
}
kindCase_ = 1;
kind_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Represents a null value.
*
*
* .google.protobuf.NullValue null_value = 1;
* @return This builder for chaining.
*/
public Builder clearNullValue() {
if (kindCase_ == 1) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @return Whether the numberValue field is set.
*/
public boolean hasNumberValue() {
return kindCase_ == 2;
}
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @return The numberValue.
*/
public double getNumberValue() {
if (kindCase_ == 2) {
return (java.lang.Double) kind_;
}
return 0D;
}
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @param value The numberValue to set.
* @return This builder for chaining.
*/
public Builder setNumberValue(double value) {
kindCase_ = 2;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a double value.
*
*
* double number_value = 2;
* @return This builder for chaining.
*/
public Builder clearNumberValue() {
if (kindCase_ == 2) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return Whether the stringValue field is set.
*/
@java.lang.Override
public boolean hasStringValue() {
return kindCase_ == 3;
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return The stringValue.
*/
@java.lang.Override
public java.lang.String getStringValue() {
java.lang.Object ref = "";
if (kindCase_ == 3) {
ref = kind_;
}
if (!(ref instanceof java.lang.String)) {
org.apache.comet.shaded.protobuf.ByteString bs =
(org.apache.comet.shaded.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (kindCase_ == 3) {
kind_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return The bytes for stringValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.ByteString
getStringValueBytes() {
java.lang.Object ref = "";
if (kindCase_ == 3) {
ref = kind_;
}
if (ref instanceof String) {
org.apache.comet.shaded.protobuf.ByteString b =
org.apache.comet.shaded.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (kindCase_ == 3) {
kind_ = b;
}
return b;
} else {
return (org.apache.comet.shaded.protobuf.ByteString) ref;
}
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @param value The stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kindCase_ = 3;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @return This builder for chaining.
*/
public Builder clearStringValue() {
if (kindCase_ == 3) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
/**
*
* Represents a string value.
*
*
* string string_value = 3;
* @param value The bytes for stringValue to set.
* @return This builder for chaining.
*/
public Builder setStringValueBytes(
org.apache.comet.shaded.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kindCase_ = 3;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @return Whether the boolValue field is set.
*/
public boolean hasBoolValue() {
return kindCase_ == 4;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @return The boolValue.
*/
public boolean getBoolValue() {
if (kindCase_ == 4) {
return (java.lang.Boolean) kind_;
}
return false;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @param value The boolValue to set.
* @return This builder for chaining.
*/
public Builder setBoolValue(boolean value) {
kindCase_ = 4;
kind_ = value;
onChanged();
return this;
}
/**
*
* Represents a boolean value.
*
*
* bool bool_value = 4;
* @return This builder for chaining.
*/
public Builder clearBoolValue() {
if (kindCase_ == 4) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
return this;
}
private org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.Struct, org.apache.comet.shaded.protobuf.Struct.Builder, org.apache.comet.shaded.protobuf.StructOrBuilder> structValueBuilder_;
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
* @return Whether the structValue field is set.
*/
@java.lang.Override
public boolean hasStructValue() {
return kindCase_ == 5;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
* @return The structValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.Struct getStructValue() {
if (structValueBuilder_ == null) {
if (kindCase_ == 5) {
return (org.apache.comet.shaded.protobuf.Struct) kind_;
}
return org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
} else {
if (kindCase_ == 5) {
return structValueBuilder_.getMessage();
}
return org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
public Builder setStructValue(org.apache.comet.shaded.protobuf.Struct value) {
if (structValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
structValueBuilder_.setMessage(value);
}
kindCase_ = 5;
return this;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
public Builder setStructValue(
org.apache.comet.shaded.protobuf.Struct.Builder builderForValue) {
if (structValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
structValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 5;
return this;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
public Builder mergeStructValue(org.apache.comet.shaded.protobuf.Struct value) {
if (structValueBuilder_ == null) {
if (kindCase_ == 5 &&
kind_ != org.apache.comet.shaded.protobuf.Struct.getDefaultInstance()) {
kind_ = org.apache.comet.shaded.protobuf.Struct.newBuilder((org.apache.comet.shaded.protobuf.Struct) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 5) {
structValueBuilder_.mergeFrom(value);
}
structValueBuilder_.setMessage(value);
}
kindCase_ = 5;
return this;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
public Builder clearStructValue() {
if (structValueBuilder_ == null) {
if (kindCase_ == 5) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 5) {
kindCase_ = 0;
kind_ = null;
}
structValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
public org.apache.comet.shaded.protobuf.Struct.Builder getStructValueBuilder() {
return getStructValueFieldBuilder().getBuilder();
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.StructOrBuilder getStructValueOrBuilder() {
if ((kindCase_ == 5) && (structValueBuilder_ != null)) {
return structValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 5) {
return (org.apache.comet.shaded.protobuf.Struct) kind_;
}
return org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* Represents a structured value.
*
*
* .google.protobuf.Struct struct_value = 5;
*/
private org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.Struct, org.apache.comet.shaded.protobuf.Struct.Builder, org.apache.comet.shaded.protobuf.StructOrBuilder>
getStructValueFieldBuilder() {
if (structValueBuilder_ == null) {
if (!(kindCase_ == 5)) {
kind_ = org.apache.comet.shaded.protobuf.Struct.getDefaultInstance();
}
structValueBuilder_ = new org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.Struct, org.apache.comet.shaded.protobuf.Struct.Builder, org.apache.comet.shaded.protobuf.StructOrBuilder>(
(org.apache.comet.shaded.protobuf.Struct) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 5;
onChanged();;
return structValueBuilder_;
}
private org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.ListValue, org.apache.comet.shaded.protobuf.ListValue.Builder, org.apache.comet.shaded.protobuf.ListValueOrBuilder> listValueBuilder_;
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
* @return Whether the listValue field is set.
*/
@java.lang.Override
public boolean hasListValue() {
return kindCase_ == 6;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
* @return The listValue.
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.ListValue getListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 6) {
return (org.apache.comet.shaded.protobuf.ListValue) kind_;
}
return org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance();
} else {
if (kindCase_ == 6) {
return listValueBuilder_.getMessage();
}
return org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance();
}
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public Builder setListValue(org.apache.comet.shaded.protobuf.ListValue value) {
if (listValueBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
onChanged();
} else {
listValueBuilder_.setMessage(value);
}
kindCase_ = 6;
return this;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public Builder setListValue(
org.apache.comet.shaded.protobuf.ListValue.Builder builderForValue) {
if (listValueBuilder_ == null) {
kind_ = builderForValue.build();
onChanged();
} else {
listValueBuilder_.setMessage(builderForValue.build());
}
kindCase_ = 6;
return this;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public Builder mergeListValue(org.apache.comet.shaded.protobuf.ListValue value) {
if (listValueBuilder_ == null) {
if (kindCase_ == 6 &&
kind_ != org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance()) {
kind_ = org.apache.comet.shaded.protobuf.ListValue.newBuilder((org.apache.comet.shaded.protobuf.ListValue) kind_)
.mergeFrom(value).buildPartial();
} else {
kind_ = value;
}
onChanged();
} else {
if (kindCase_ == 6) {
listValueBuilder_.mergeFrom(value);
}
listValueBuilder_.setMessage(value);
}
kindCase_ = 6;
return this;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public Builder clearListValue() {
if (listValueBuilder_ == null) {
if (kindCase_ == 6) {
kindCase_ = 0;
kind_ = null;
onChanged();
}
} else {
if (kindCase_ == 6) {
kindCase_ = 0;
kind_ = null;
}
listValueBuilder_.clear();
}
return this;
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
public org.apache.comet.shaded.protobuf.ListValue.Builder getListValueBuilder() {
return getListValueFieldBuilder().getBuilder();
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
@java.lang.Override
public org.apache.comet.shaded.protobuf.ListValueOrBuilder getListValueOrBuilder() {
if ((kindCase_ == 6) && (listValueBuilder_ != null)) {
return listValueBuilder_.getMessageOrBuilder();
} else {
if (kindCase_ == 6) {
return (org.apache.comet.shaded.protobuf.ListValue) kind_;
}
return org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance();
}
}
/**
*
* Represents a repeated `Value`.
*
*
* .google.protobuf.ListValue list_value = 6;
*/
private org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.ListValue, org.apache.comet.shaded.protobuf.ListValue.Builder, org.apache.comet.shaded.protobuf.ListValueOrBuilder>
getListValueFieldBuilder() {
if (listValueBuilder_ == null) {
if (!(kindCase_ == 6)) {
kind_ = org.apache.comet.shaded.protobuf.ListValue.getDefaultInstance();
}
listValueBuilder_ = new org.apache.comet.shaded.protobuf.SingleFieldBuilderV3<
org.apache.comet.shaded.protobuf.ListValue, org.apache.comet.shaded.protobuf.ListValue.Builder, org.apache.comet.shaded.protobuf.ListValueOrBuilder>(
(org.apache.comet.shaded.protobuf.ListValue) kind_,
getParentForChildren(),
isClean());
kind_ = null;
}
kindCase_ = 6;
onChanged();;
return listValueBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final org.apache.comet.shaded.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final org.apache.comet.shaded.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.protobuf.Value)
}
// @@protoc_insertion_point(class_scope:google.protobuf.Value)
private static final org.apache.comet.shaded.protobuf.Value DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.comet.shaded.protobuf.Value();
}
public static org.apache.comet.shaded.protobuf.Value getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final org.apache.comet.shaded.protobuf.Parser
PARSER = new org.apache.comet.shaded.protobuf.AbstractParser() {
@java.lang.Override
public Value parsePartialFrom(
org.apache.comet.shaded.protobuf.CodedInputStream input,
org.apache.comet.shaded.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.comet.shaded.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (org.apache.comet.shaded.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (org.apache.comet.shaded.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new org.apache.comet.shaded.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static org.apache.comet.shaded.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.apache.comet.shaded.protobuf.Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}