Enum Class NullValue

java.lang.Object
java.lang.Enum<NullValue>
com.google.protobuf.NullValue
All Implemented Interfaces:
Internal.EnumLite, Serializable, Comparable<NullValue>, Constable

@Generated public enum NullValue extends Enum<NullValue> implements Internal.EnumLite
Represents a JSON `null`.

`NullValue` is a sentinel, using an enum with only one value to represent
the null value for the `Value` type union.

A field of type `NullValue` with any value other than `0` is considered
invalid. Most ProtoJSON serializers will emit a `Value` with a `null_value`
set as a JSON `null` regardless of the integer value, and so will round trip
to a `0` value.
Protobuf enum google.protobuf.NullValue
  • Enum Constant Details

    • NULL_VALUE

      public static final NullValue NULL_VALUE
      Null value.
      
      NULL_VALUE = 0;
    • UNRECOGNIZED

      public static final NullValue UNRECOGNIZED
  • Field Details

  • Constructor Details

    • NullValue

      private NullValue(int value)
  • Method Details

    • values

      public static NullValue[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NullValue valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface Internal.EnumLite
    • valueOf

      @Deprecated public static NullValue valueOf(int value)
      Deprecated.
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static NullValue forNumber(int value)
    • internalGetValueMap

      public static Internal.EnumLiteMap<NullValue> internalGetValueMap()
    • internalGetVerifier

      public static Internal.EnumVerifier internalGetVerifier()