Enum NullableIndex.CheckMode
- java.lang.Object
-
- java.lang.Enum<NullableIndex.CheckMode>
-
- software.amazon.smithy.model.knowledge.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 theInputTrait
andClientOptionalTrait
.CLIENT_CAREFUL
LikeCLIENT
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.SERVER
A server, or any other kind of authoritative model consumer that does not honor theInputTrait
andClientOptionalTrait
.
-
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.
-
-
-
Enum Constant Detail
-
CLIENT
public static final NullableIndex.CheckMode CLIENT
A client, or any other kind of non-authoritative model consumer that must honor theInputTrait
andClientOptionalTrait
.
-
CLIENT_CAREFUL
public static final NullableIndex.CheckMode CLIENT_CAREFUL
LikeCLIENT
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.
-
SERVER
public static final NullableIndex.CheckMode SERVER
A server, or any other kind of authoritative model consumer that does not honor theInputTrait
andClientOptionalTrait
.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 namejava.lang.NullPointerException
- if the argument is null
-
-