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

com.github.os72.protobuf351.Value Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/struct.proto

package com.github.os72.protobuf351;

/**
 * 
 * `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 that
 * 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 com.github.os72.protobuf351.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.protobuf.Value) ValueOrBuilder { private static final long serialVersionUID = 0L; // Use Value.newBuilder() to construct. private Value(com.github.os72.protobuf351.GeneratedMessageV3.Builder builder) { super(builder); } private Value() { } @java.lang.Override public final com.github.os72.protobuf351.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Value( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.github.os72.protobuf351.UnknownFieldSet.Builder unknownFields = com.github.os72.protobuf351.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); kindCase_ = 1; kind_ = rawValue; break; } case 17: { kindCase_ = 2; kind_ = input.readDouble(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); kindCase_ = 3; kind_ = s; break; } case 32: { kindCase_ = 4; kind_ = input.readBool(); break; } case 42: { com.github.os72.protobuf351.Struct.Builder subBuilder = null; if (kindCase_ == 5) { subBuilder = ((com.github.os72.protobuf351.Struct) kind_).toBuilder(); } kind_ = input.readMessage(com.github.os72.protobuf351.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.github.os72.protobuf351.Struct) kind_); kind_ = subBuilder.buildPartial(); } kindCase_ = 5; break; } case 50: { com.github.os72.protobuf351.ListValue.Builder subBuilder = null; if (kindCase_ == 6) { subBuilder = ((com.github.os72.protobuf351.ListValue) kind_).toBuilder(); } kind_ = input.readMessage(com.github.os72.protobuf351.ListValue.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.github.os72.protobuf351.ListValue) kind_); kind_ = subBuilder.buildPartial(); } kindCase_ = 6; break; } } } } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.github.os72.protobuf351.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return com.github.os72.protobuf351.StructProto.internal_static_google_protobuf_Value_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.os72.protobuf351.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.os72.protobuf351.Value.class, com.github.os72.protobuf351.Value.Builder.class); } private int kindCase_ = 0; private java.lang.Object kind_; public enum KindCase implements com.github.os72.protobuf351.Internal.EnumLite { 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; } /** * @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; */ public int getNullValueValue() { if (kindCase_ == 1) { return (java.lang.Integer) kind_; } return 0; } /** *
   * Represents a null value.
   * 
* * .google.protobuf.NullValue null_value = 1; */ public com.github.os72.protobuf351.NullValue getNullValue() { if (kindCase_ == 1) { com.github.os72.protobuf351.NullValue result = com.github.os72.protobuf351.NullValue.valueOf( (java.lang.Integer) kind_); return result == null ? com.github.os72.protobuf351.NullValue.UNRECOGNIZED : result; } return com.github.os72.protobuf351.NullValue.NULL_VALUE; } public static final int NUMBER_VALUE_FIELD_NUMBER = 2; /** *
   * Represents a double value.
   * 
* * double number_value = 2; */ 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; */ 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 { com.github.os72.protobuf351.ByteString bs = (com.github.os72.protobuf351.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (kindCase_ == 3) { kind_ = s; } return s; } } /** *
   * Represents a string value.
   * 
* * string string_value = 3; */ public com.github.os72.protobuf351.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (kindCase_ == 3) { ref = kind_; } if (ref instanceof java.lang.String) { com.github.os72.protobuf351.ByteString b = com.github.os72.protobuf351.ByteString.copyFromUtf8( (java.lang.String) ref); if (kindCase_ == 3) { kind_ = b; } return b; } else { return (com.github.os72.protobuf351.ByteString) ref; } } public static final int BOOL_VALUE_FIELD_NUMBER = 4; /** *
   * Represents a boolean value.
   * 
* * bool bool_value = 4; */ 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; */ public boolean hasStructValue() { return kindCase_ == 5; } /** *
   * Represents a structured value.
   * 
* * .google.protobuf.Struct struct_value = 5; */ public com.github.os72.protobuf351.Struct getStructValue() { if (kindCase_ == 5) { return (com.github.os72.protobuf351.Struct) kind_; } return com.github.os72.protobuf351.Struct.getDefaultInstance(); } /** *
   * Represents a structured value.
   * 
* * .google.protobuf.Struct struct_value = 5; */ public com.github.os72.protobuf351.StructOrBuilder getStructValueOrBuilder() { if (kindCase_ == 5) { return (com.github.os72.protobuf351.Struct) kind_; } return com.github.os72.protobuf351.Struct.getDefaultInstance(); } public static final int LIST_VALUE_FIELD_NUMBER = 6; /** *
   * Represents a repeated `Value`.
   * 
* * .google.protobuf.ListValue list_value = 6; */ public boolean hasListValue() { return kindCase_ == 6; } /** *
   * Represents a repeated `Value`.
   * 
* * .google.protobuf.ListValue list_value = 6; */ public com.github.os72.protobuf351.ListValue getListValue() { if (kindCase_ == 6) { return (com.github.os72.protobuf351.ListValue) kind_; } return com.github.os72.protobuf351.ListValue.getDefaultInstance(); } /** *
   * Represents a repeated `Value`.
   * 
* * .google.protobuf.ListValue list_value = 6; */ public com.github.os72.protobuf351.ListValueOrBuilder getListValueOrBuilder() { if (kindCase_ == 6) { return (com.github.os72.protobuf351.ListValue) kind_; } return com.github.os72.protobuf351.ListValue.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.github.os72.protobuf351.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) { com.github.os72.protobuf351.GeneratedMessageV3.writeString(output, 3, kind_); } if (kindCase_ == 4) { output.writeBool( 4, (boolean)((java.lang.Boolean) kind_)); } if (kindCase_ == 5) { output.writeMessage(5, (com.github.os72.protobuf351.Struct) kind_); } if (kindCase_ == 6) { output.writeMessage(6, (com.github.os72.protobuf351.ListValue) kind_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (kindCase_ == 1) { size += com.github.os72.protobuf351.CodedOutputStream .computeEnumSize(1, ((java.lang.Integer) kind_)); } if (kindCase_ == 2) { size += com.github.os72.protobuf351.CodedOutputStream .computeDoubleSize( 2, (double)((java.lang.Double) kind_)); } if (kindCase_ == 3) { size += com.github.os72.protobuf351.GeneratedMessageV3.computeStringSize(3, kind_); } if (kindCase_ == 4) { size += com.github.os72.protobuf351.CodedOutputStream .computeBoolSize( 4, (boolean)((java.lang.Boolean) kind_)); } if (kindCase_ == 5) { size += com.github.os72.protobuf351.CodedOutputStream .computeMessageSize(5, (com.github.os72.protobuf351.Struct) kind_); } if (kindCase_ == 6) { size += com.github.os72.protobuf351.CodedOutputStream .computeMessageSize(6, (com.github.os72.protobuf351.ListValue) kind_); } size += unknownFields.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.github.os72.protobuf351.Value)) { return super.equals(obj); } com.github.os72.protobuf351.Value other = (com.github.os72.protobuf351.Value) obj; boolean result = true; result = result && getKindCase().equals( other.getKindCase()); if (!result) return false; switch (kindCase_) { case 1: result = result && getNullValueValue() == other.getNullValueValue(); break; case 2: result = result && ( java.lang.Double.doubleToLongBits(getNumberValue()) == java.lang.Double.doubleToLongBits( other.getNumberValue())); break; case 3: result = result && getStringValue() .equals(other.getStringValue()); break; case 4: result = result && (getBoolValue() == other.getBoolValue()); break; case 5: result = result && getStructValue() .equals(other.getStructValue()); break; case 6: result = result && getListValue() .equals(other.getListValue()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; } @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) + com.github.os72.protobuf351.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) + com.github.os72.protobuf351.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) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.github.os72.protobuf351.Value parseFrom( java.nio.ByteBuffer data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.os72.protobuf351.Value parseFrom( java.nio.ByteBuffer data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.os72.protobuf351.Value parseFrom( com.github.os72.protobuf351.ByteString data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.os72.protobuf351.Value parseFrom( com.github.os72.protobuf351.ByteString data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.os72.protobuf351.Value parseFrom(byte[] data) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.os72.protobuf351.Value parseFrom( byte[] data, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.os72.protobuf351.Value parseFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.os72.protobuf351.Value parseFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.github.os72.protobuf351.Value parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.github.os72.protobuf351.Value parseDelimitedFrom( java.io.InputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.github.os72.protobuf351.Value parseFrom( com.github.os72.protobuf351.CodedInputStream input) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.os72.protobuf351.Value parseFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.github.os72.protobuf351.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.github.os72.protobuf351.Value prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.github.os72.protobuf351.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 that
   * 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 com.github.os72.protobuf351.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.protobuf.Value) com.github.os72.protobuf351.ValueOrBuilder { public static final com.github.os72.protobuf351.Descriptors.Descriptor getDescriptor() { return com.github.os72.protobuf351.StructProto.internal_static_google_protobuf_Value_descriptor; } protected com.github.os72.protobuf351.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.os72.protobuf351.StructProto.internal_static_google_protobuf_Value_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.os72.protobuf351.Value.class, com.github.os72.protobuf351.Value.Builder.class); } // Construct using com.github.os72.protobuf351.Value.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.github.os72.protobuf351.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.github.os72.protobuf351.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); kindCase_ = 0; kind_ = null; return this; } public com.github.os72.protobuf351.Descriptors.Descriptor getDescriptorForType() { return com.github.os72.protobuf351.StructProto.internal_static_google_protobuf_Value_descriptor; } public com.github.os72.protobuf351.Value getDefaultInstanceForType() { return com.github.os72.protobuf351.Value.getDefaultInstance(); } public com.github.os72.protobuf351.Value build() { com.github.os72.protobuf351.Value result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.github.os72.protobuf351.Value buildPartial() { com.github.os72.protobuf351.Value result = new com.github.os72.protobuf351.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; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.github.os72.protobuf351.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.github.os72.protobuf351.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.github.os72.protobuf351.Message other) { if (other instanceof com.github.os72.protobuf351.Value) { return mergeFrom((com.github.os72.protobuf351.Value)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.github.os72.protobuf351.Value other) { if (other == com.github.os72.protobuf351.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.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.github.os72.protobuf351.Value parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.github.os72.protobuf351.InvalidProtocolBufferException e) { parsedMessage = (com.github.os72.protobuf351.Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } 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; */ public int getNullValueValue() { if (kindCase_ == 1) { return ((java.lang.Integer) kind_).intValue(); } return 0; } /** *
     * Represents a null value.
     * 
* * .google.protobuf.NullValue null_value = 1; */ public Builder setNullValueValue(int value) { kindCase_ = 1; kind_ = value; onChanged(); return this; } /** *
     * Represents a null value.
     * 
* * .google.protobuf.NullValue null_value = 1; */ public com.github.os72.protobuf351.NullValue getNullValue() { if (kindCase_ == 1) { com.github.os72.protobuf351.NullValue result = com.github.os72.protobuf351.NullValue.valueOf( (java.lang.Integer) kind_); return result == null ? com.github.os72.protobuf351.NullValue.UNRECOGNIZED : result; } return com.github.os72.protobuf351.NullValue.NULL_VALUE; } /** *
     * Represents a null value.
     * 
* * .google.protobuf.NullValue null_value = 1; */ public Builder setNullValue(com.github.os72.protobuf351.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; */ public Builder clearNullValue() { if (kindCase_ == 1) { kindCase_ = 0; kind_ = null; onChanged(); } return this; } /** *
     * Represents a double value.
     * 
* * double number_value = 2; */ public double getNumberValue() { if (kindCase_ == 2) { return (java.lang.Double) kind_; } return 0D; } /** *
     * Represents a double value.
     * 
* * double number_value = 2; */ public Builder setNumberValue(double value) { kindCase_ = 2; kind_ = value; onChanged(); return this; } /** *
     * Represents a double value.
     * 
* * double number_value = 2; */ public Builder clearNumberValue() { if (kindCase_ == 2) { kindCase_ = 0; kind_ = null; onChanged(); } return this; } /** *
     * Represents a string value.
     * 
* * string string_value = 3; */ public java.lang.String getStringValue() { java.lang.Object ref = ""; if (kindCase_ == 3) { ref = kind_; } if (!(ref instanceof java.lang.String)) { com.github.os72.protobuf351.ByteString bs = (com.github.os72.protobuf351.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; */ public com.github.os72.protobuf351.ByteString getStringValueBytes() { java.lang.Object ref = ""; if (kindCase_ == 3) { ref = kind_; } if (ref instanceof String) { com.github.os72.protobuf351.ByteString b = com.github.os72.protobuf351.ByteString.copyFromUtf8( (java.lang.String) ref); if (kindCase_ == 3) { kind_ = b; } return b; } else { return (com.github.os72.protobuf351.ByteString) ref; } } /** *
     * Represents a string value.
     * 
* * string string_value = 3; */ 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; */ public Builder clearStringValue() { if (kindCase_ == 3) { kindCase_ = 0; kind_ = null; onChanged(); } return this; } /** *
     * Represents a string value.
     * 
* * string string_value = 3; */ public Builder setStringValueBytes( com.github.os72.protobuf351.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; */ public boolean getBoolValue() { if (kindCase_ == 4) { return (java.lang.Boolean) kind_; } return false; } /** *
     * Represents a boolean value.
     * 
* * bool bool_value = 4; */ public Builder setBoolValue(boolean value) { kindCase_ = 4; kind_ = value; onChanged(); return this; } /** *
     * Represents a boolean value.
     * 
* * bool bool_value = 4; */ public Builder clearBoolValue() { if (kindCase_ == 4) { kindCase_ = 0; kind_ = null; onChanged(); } return this; } private com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.Struct, com.github.os72.protobuf351.Struct.Builder, com.github.os72.protobuf351.StructOrBuilder> structValueBuilder_; /** *
     * Represents a structured value.
     * 
* * .google.protobuf.Struct struct_value = 5; */ public boolean hasStructValue() { return kindCase_ == 5; } /** *
     * Represents a structured value.
     * 
* * .google.protobuf.Struct struct_value = 5; */ public com.github.os72.protobuf351.Struct getStructValue() { if (structValueBuilder_ == null) { if (kindCase_ == 5) { return (com.github.os72.protobuf351.Struct) kind_; } return com.github.os72.protobuf351.Struct.getDefaultInstance(); } else { if (kindCase_ == 5) { return structValueBuilder_.getMessage(); } return com.github.os72.protobuf351.Struct.getDefaultInstance(); } } /** *
     * Represents a structured value.
     * 
* * .google.protobuf.Struct struct_value = 5; */ public Builder setStructValue(com.github.os72.protobuf351.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( com.github.os72.protobuf351.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(com.github.os72.protobuf351.Struct value) { if (structValueBuilder_ == null) { if (kindCase_ == 5 && kind_ != com.github.os72.protobuf351.Struct.getDefaultInstance()) { kind_ = com.github.os72.protobuf351.Struct.newBuilder((com.github.os72.protobuf351.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 com.github.os72.protobuf351.Struct.Builder getStructValueBuilder() { return getStructValueFieldBuilder().getBuilder(); } /** *
     * Represents a structured value.
     * 
* * .google.protobuf.Struct struct_value = 5; */ public com.github.os72.protobuf351.StructOrBuilder getStructValueOrBuilder() { if ((kindCase_ == 5) && (structValueBuilder_ != null)) { return structValueBuilder_.getMessageOrBuilder(); } else { if (kindCase_ == 5) { return (com.github.os72.protobuf351.Struct) kind_; } return com.github.os72.protobuf351.Struct.getDefaultInstance(); } } /** *
     * Represents a structured value.
     * 
* * .google.protobuf.Struct struct_value = 5; */ private com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.Struct, com.github.os72.protobuf351.Struct.Builder, com.github.os72.protobuf351.StructOrBuilder> getStructValueFieldBuilder() { if (structValueBuilder_ == null) { if (!(kindCase_ == 5)) { kind_ = com.github.os72.protobuf351.Struct.getDefaultInstance(); } structValueBuilder_ = new com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.Struct, com.github.os72.protobuf351.Struct.Builder, com.github.os72.protobuf351.StructOrBuilder>( (com.github.os72.protobuf351.Struct) kind_, getParentForChildren(), isClean()); kind_ = null; } kindCase_ = 5; onChanged();; return structValueBuilder_; } private com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.ListValue, com.github.os72.protobuf351.ListValue.Builder, com.github.os72.protobuf351.ListValueOrBuilder> listValueBuilder_; /** *
     * Represents a repeated `Value`.
     * 
* * .google.protobuf.ListValue list_value = 6; */ public boolean hasListValue() { return kindCase_ == 6; } /** *
     * Represents a repeated `Value`.
     * 
* * .google.protobuf.ListValue list_value = 6; */ public com.github.os72.protobuf351.ListValue getListValue() { if (listValueBuilder_ == null) { if (kindCase_ == 6) { return (com.github.os72.protobuf351.ListValue) kind_; } return com.github.os72.protobuf351.ListValue.getDefaultInstance(); } else { if (kindCase_ == 6) { return listValueBuilder_.getMessage(); } return com.github.os72.protobuf351.ListValue.getDefaultInstance(); } } /** *
     * Represents a repeated `Value`.
     * 
* * .google.protobuf.ListValue list_value = 6; */ public Builder setListValue(com.github.os72.protobuf351.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( com.github.os72.protobuf351.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(com.github.os72.protobuf351.ListValue value) { if (listValueBuilder_ == null) { if (kindCase_ == 6 && kind_ != com.github.os72.protobuf351.ListValue.getDefaultInstance()) { kind_ = com.github.os72.protobuf351.ListValue.newBuilder((com.github.os72.protobuf351.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 com.github.os72.protobuf351.ListValue.Builder getListValueBuilder() { return getListValueFieldBuilder().getBuilder(); } /** *
     * Represents a repeated `Value`.
     * 
* * .google.protobuf.ListValue list_value = 6; */ public com.github.os72.protobuf351.ListValueOrBuilder getListValueOrBuilder() { if ((kindCase_ == 6) && (listValueBuilder_ != null)) { return listValueBuilder_.getMessageOrBuilder(); } else { if (kindCase_ == 6) { return (com.github.os72.protobuf351.ListValue) kind_; } return com.github.os72.protobuf351.ListValue.getDefaultInstance(); } } /** *
     * Represents a repeated `Value`.
     * 
* * .google.protobuf.ListValue list_value = 6; */ private com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.ListValue, com.github.os72.protobuf351.ListValue.Builder, com.github.os72.protobuf351.ListValueOrBuilder> getListValueFieldBuilder() { if (listValueBuilder_ == null) { if (!(kindCase_ == 6)) { kind_ = com.github.os72.protobuf351.ListValue.getDefaultInstance(); } listValueBuilder_ = new com.github.os72.protobuf351.SingleFieldBuilderV3< com.github.os72.protobuf351.ListValue, com.github.os72.protobuf351.ListValue.Builder, com.github.os72.protobuf351.ListValueOrBuilder>( (com.github.os72.protobuf351.ListValue) kind_, getParentForChildren(), isClean()); kind_ = null; } kindCase_ = 6; onChanged();; return listValueBuilder_; } public final Builder setUnknownFields( final com.github.os72.protobuf351.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.github.os72.protobuf351.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 com.github.os72.protobuf351.Value DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.github.os72.protobuf351.Value(); } public static com.github.os72.protobuf351.Value getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.github.os72.protobuf351.Parser PARSER = new com.github.os72.protobuf351.AbstractParser() { public Value parsePartialFrom( com.github.os72.protobuf351.CodedInputStream input, com.github.os72.protobuf351.ExtensionRegistryLite extensionRegistry) throws com.github.os72.protobuf351.InvalidProtocolBufferException { return new Value(input, extensionRegistry); } }; public static com.github.os72.protobuf351.Parser parser() { return PARSER; } @java.lang.Override public com.github.os72.protobuf351.Parser getParserForType() { return PARSER; } public com.github.os72.protobuf351.Value getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy