Enum NullableIndex.CheckMode

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<NullableIndex.CheckMode>
    Enclosing class:
    NullableIndex

    public static enum NullableIndex.CheckMode
    extends java.lang.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 Summary

      Enum Constants 
      Enum Constant Description
      CLIENT
      A client, or any other kind of non-authoritative model consumer that must honor the InputTrait and ClientOptionalTrait.
      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
      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.
      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.
      SERVER
      A server, or any other kind of authoritative model consumer that does not honor the InputTrait and ClientOptionalTrait.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static NullableIndex.CheckMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static NullableIndex.CheckMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static NullableIndex.CheckMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NullableIndex.CheckMode c : NullableIndex.CheckMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NullableIndex.CheckMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null