Class Value

All Implemented Interfaces:
MessageLite, MessageLiteOrBuilder, ValueOrBuilder

public final class Value extends GeneratedMessageLite<Value,Value.Builder> implements ValueOrBuilder
 `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 google.protobuf.Value
  • Field Details

    • kindCase_

      private int kindCase_
    • kind_

      private Object kind_
    • NULL_VALUE_FIELD_NUMBER

      public static final int NULL_VALUE_FIELD_NUMBER
      See Also:
    • NUMBER_VALUE_FIELD_NUMBER

      public static final int NUMBER_VALUE_FIELD_NUMBER
      See Also:
    • STRING_VALUE_FIELD_NUMBER

      public static final int STRING_VALUE_FIELD_NUMBER
      See Also:
    • BOOL_VALUE_FIELD_NUMBER

      public static final int BOOL_VALUE_FIELD_NUMBER
      See Also:
    • STRUCT_VALUE_FIELD_NUMBER

      public static final int STRUCT_VALUE_FIELD_NUMBER
      See Also:
    • LIST_VALUE_FIELD_NUMBER

      public static final int LIST_VALUE_FIELD_NUMBER
      See Also:
    • DEFAULT_INSTANCE

      private static final Value DEFAULT_INSTANCE
    • PARSER

      private static volatile Parser<Value> PARSER
  • Constructor Details

    • Value

      private Value()
  • Method Details

    • getKindCase

      public Value.KindCase getKindCase()
      Specified by:
      getKindCase in interface ValueOrBuilder
    • clearKind

      private void clearKind()
    • hasNullValue

      public boolean hasNullValue()
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
      Specified by:
      hasNullValue in interface ValueOrBuilder
      Returns:
      Whether the nullValue field is set.
    • getNullValueValue

      public int getNullValueValue()
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
      Specified by:
      getNullValueValue in interface ValueOrBuilder
      Returns:
      The enum numeric value on the wire for nullValue.
    • getNullValue

      public NullValue getNullValue()
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
      Specified by:
      getNullValue in interface ValueOrBuilder
      Returns:
      The nullValue.
    • setNullValueValue

      private void setNullValueValue(int value)
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
      Parameters:
      value - The enum numeric value on the wire for nullValue to set.
    • setNullValue

      private void setNullValue(NullValue value)
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
      Parameters:
      value - The nullValue to set.
    • clearNullValue

      private void clearNullValue()
       Represents a null value.
       
      .google.protobuf.NullValue null_value = 1;
    • hasNumberValue

      public boolean hasNumberValue()
       Represents a double value.
       
      double number_value = 2;
      Specified by:
      hasNumberValue in interface ValueOrBuilder
      Returns:
      Whether the numberValue field is set.
    • getNumberValue

      public double getNumberValue()
       Represents a double value.
       
      double number_value = 2;
      Specified by:
      getNumberValue in interface ValueOrBuilder
      Returns:
      The numberValue.
    • setNumberValue

      private void setNumberValue(double value)
       Represents a double value.
       
      double number_value = 2;
      Parameters:
      value - The numberValue to set.
    • clearNumberValue

      private void clearNumberValue()
       Represents a double value.
       
      double number_value = 2;
    • hasStringValue

      public boolean hasStringValue()
       Represents a string value.
       
      string string_value = 3;
      Specified by:
      hasStringValue in interface ValueOrBuilder
      Returns:
      Whether the stringValue field is set.
    • getStringValue

      public String getStringValue()
       Represents a string value.
       
      string string_value = 3;
      Specified by:
      getStringValue in interface ValueOrBuilder
      Returns:
      The stringValue.
    • getStringValueBytes

      public ByteString getStringValueBytes()
       Represents a string value.
       
      string string_value = 3;
      Specified by:
      getStringValueBytes in interface ValueOrBuilder
      Returns:
      The bytes for stringValue.
    • setStringValue

      private void setStringValue(String value)
       Represents a string value.
       
      string string_value = 3;
      Parameters:
      value - The stringValue to set.
    • clearStringValue

      private void clearStringValue()
       Represents a string value.
       
      string string_value = 3;
    • setStringValueBytes

      private void setStringValueBytes(ByteString value)
       Represents a string value.
       
      string string_value = 3;
      Parameters:
      value - The bytes for stringValue to set.
    • hasBoolValue

      public boolean hasBoolValue()
       Represents a boolean value.
       
      bool bool_value = 4;
      Specified by:
      hasBoolValue in interface ValueOrBuilder
      Returns:
      Whether the boolValue field is set.
    • getBoolValue

      public boolean getBoolValue()
       Represents a boolean value.
       
      bool bool_value = 4;
      Specified by:
      getBoolValue in interface ValueOrBuilder
      Returns:
      The boolValue.
    • setBoolValue

      private void setBoolValue(boolean value)
       Represents a boolean value.
       
      bool bool_value = 4;
      Parameters:
      value - The boolValue to set.
    • clearBoolValue

      private void clearBoolValue()
       Represents a boolean value.
       
      bool bool_value = 4;
    • hasStructValue

      public boolean hasStructValue()
       Represents a structured value.
       
      .google.protobuf.Struct struct_value = 5;
      Specified by:
      hasStructValue in interface ValueOrBuilder
      Returns:
      Whether the structValue field is set.
    • getStructValue

      public Struct getStructValue()
       Represents a structured value.
       
      .google.protobuf.Struct struct_value = 5;
      Specified by:
      getStructValue in interface ValueOrBuilder
      Returns:
      The structValue.
    • setStructValue

      private void setStructValue(Struct value)
       Represents a structured value.
       
      .google.protobuf.Struct struct_value = 5;
    • mergeStructValue

      private void mergeStructValue(Struct value)
       Represents a structured value.
       
      .google.protobuf.Struct struct_value = 5;
    • clearStructValue

      private void clearStructValue()
       Represents a structured value.
       
      .google.protobuf.Struct struct_value = 5;
    • hasListValue

      public boolean hasListValue()
       Represents a repeated `Value`.
       
      .google.protobuf.ListValue list_value = 6;
      Specified by:
      hasListValue in interface ValueOrBuilder
      Returns:
      Whether the listValue field is set.
    • getListValue

      public ListValue getListValue()
       Represents a repeated `Value`.
       
      .google.protobuf.ListValue list_value = 6;
      Specified by:
      getListValue in interface ValueOrBuilder
      Returns:
      The listValue.
    • setListValue

      private void setListValue(ListValue value)
       Represents a repeated `Value`.
       
      .google.protobuf.ListValue list_value = 6;
    • mergeListValue

      private void mergeListValue(ListValue value)
       Represents a repeated `Value`.
       
      .google.protobuf.ListValue list_value = 6;
    • clearListValue

      private void clearListValue()
       Represents a repeated `Value`.
       
      .google.protobuf.ListValue list_value = 6;
    • parseFrom

      public static Value parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(ByteString data) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(byte[] data) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
      Throws:
      InvalidProtocolBufferException
    • parseFrom

      public static Value parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Value parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Value parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Value parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Value parseFrom(CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Value parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static Value.Builder newBuilder()
    • newBuilder

      public static Value.Builder newBuilder(Value prototype)
    • dynamicMethod

      protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Description copied from class: GeneratedMessageLite
      A method that implements different types of operations described in GeneratedMessageLite.MethodToInvoke. These different kinds of operations are required to implement message-level operations for builders in the runtime. This method bundles those operations to reduce the generated methods count.
      • NEW_INSTANCE returns a new instance of the protocol buffer that has not yet been made immutable. See MAKE_IMMUTABLE.
      • IS_INITIALIZED returns null for false and the default instance for true. It doesn't use or modify any memoized value.
      • GET_MEMOIZED_IS_INITIALIZED returns the memoized isInitialized byte value.
      • SET_MEMOIZED_IS_INITIALIZED sets the memoized isInitialized byte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.
      • NEW_BUILDER returns a BuilderType instance.
      This method, plus the implementation of the Builder, enables the Builder class to be proguarded away entirely on Android.

      For use by generated code only.

      Specified by:
      dynamicMethod in class GeneratedMessageLite<Value,Value.Builder>
    • getDefaultInstance

      public static Value getDefaultInstance()
    • parser

      public static Parser<Value> parser()