Enum Class DescriptorProtos.FieldOptions.OptionRetention

java.lang.Object
java.lang.Enum<DescriptorProtos.FieldOptions.OptionRetention>
com.google.protobuf.DescriptorProtos.FieldOptions.OptionRetention
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, Serializable, Comparable<DescriptorProtos.FieldOptions.OptionRetention>, java.lang.constant.Constable
Enclosing class:
DescriptorProtos.FieldOptions

public static enum DescriptorProtos.FieldOptions.OptionRetention extends Enum<DescriptorProtos.FieldOptions.OptionRetention> implements com.google.protobuf.Internal.EnumLite
 If set to RETENTION_SOURCE, the option will be omitted from the binary.
 Note: as of January 2023, support for this is in progress and does not yet
 have an effect (b/264593489).
 
Protobuf enum google.protobuf.FieldOptions.OptionRetention
  • Enum Constant Details

  • Field Details

    • RETENTION_UNKNOWN_VALUE

      public static final int RETENTION_UNKNOWN_VALUE
      RETENTION_UNKNOWN = 0;
      See Also:
    • RETENTION_RUNTIME_VALUE

      public static final int RETENTION_RUNTIME_VALUE
      RETENTION_RUNTIME = 1;
      See Also:
    • RETENTION_SOURCE_VALUE

      public static final int RETENTION_SOURCE_VALUE
      RETENTION_SOURCE = 2;
      See Also:
  • Method Details

    • 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

      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 com.google.protobuf.Internal.EnumLite
    • valueOf

      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 DescriptorProtos.FieldOptions.OptionRetention forNumber(int value)
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<DescriptorProtos.FieldOptions.OptionRetention> internalGetValueMap()
    • internalGetVerifier

      public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier()