Enum Class NullableIndex.CheckMode

java.lang.Object
java.lang.Enum<NullableIndex.CheckMode>
software.amazon.smithy.model.knowledge.NullableIndex.CheckMode
All Implemented Interfaces:
Serializable, Comparable<NullableIndex.CheckMode>, Constable
Enclosing class:
NullableIndex

public static enum NullableIndex.CheckMode extends Enum<NullableIndex.CheckMode>
Defines the type of model consumer to assume when determining if a member should be considered nullable or always present.
  • Enum Constant Details

    • CLIENT

      public static final NullableIndex.CheckMode CLIENT
      A client, or any other kind of non-authoritative model consumer that must honor the InputTrait and ClientOptionalTrait.
    • CLIENT_CAREFUL

      public static final NullableIndex.CheckMode CLIENT_CAREFUL
      Like CLIENT mode, but will treat all members that target structures and unions as optional because these members can never transition to optional using a default trait.
    • CLIENT_ZERO_VALUE_V1

      public static final NullableIndex.CheckMode CLIENT_ZERO_VALUE_V1
      Evaluates only default traits on members that are set to their zero value based on Smithy IDL 1.0 semantics (that is, only looks at shapes that had a zero value in Smithy v1, including byte, short, integer, long, float, double, and boolean. If a member is marked with addedDefault or with clientOptional or is in an input structure, then the member is always considered nullable.
    • CLIENT_ZERO_VALUE_V1_NO_INPUT

      public static final NullableIndex.CheckMode CLIENT_ZERO_VALUE_V1_NO_INPUT
      Evaluates only default traits on members that are set to their zero value based on Smithy IDL 1.0 semantics (that is, only looks at shapes that had a zero value in Smithy v1, including byte, short, integer, long, float, double, and boolean. If a member is marked with addedDefault or with clientOptional, then the member is always considered nullable.
    • SERVER

      public static final NullableIndex.CheckMode SERVER
      A server, or any other kind of authoritative model consumer that does not honor the InputTrait and ClientOptionalTrait.

      This mode should only be used for model consumers that have perfect knowledge of the model because they are built and deployed in lock-step with model updates. A client does not have perfect knowledge of a model because it has to be generated, deployed, and then migrated to when model updates are released. However, a server is required to be updated in order to implement newly added model components.

  • Method Details

    • values

      public static NullableIndex.CheckMode[] 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 NullableIndex.CheckMode 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