Class DefineConditionKeysTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.aws.iam.traits.DefineConditionKeysTrait
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,ToShapeId
,Trait
,ToSmithyBuilder<DefineConditionKeysTrait>
public final class DefineConditionKeysTrait extends AbstractTrait implements ToSmithyBuilder<DefineConditionKeysTrait>
Defines condition keys used in a service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefineConditionKeysTrait.Builder
static class
DefineConditionKeysTrait.Provider
-
Method Summary
Modifier and Type Method Description static DefineConditionKeysTrait.Builder
builder()
protected Node
createNode()
The result of toNode is used for hashCodes and equality.java.util.Optional<ConditionKeyDefinition>
getConditionKey(java.lang.String name)
Get a specific condition key by name.java.util.Map<java.lang.String,ConditionKeyDefinition>
getConditionKeys()
Gets all condition keys of the service.DefineConditionKeysTrait.Builder
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, toNode, toShapeId, toString
-
-
-
-
Field Detail
-
ID
public static final ShapeId ID
-
-
Method Detail
-
builder
public static DefineConditionKeysTrait.Builder builder()
-
getConditionKeys
public java.util.Map<java.lang.String,ConditionKeyDefinition> getConditionKeys()
Gets all condition keys of the service.- Returns:
- Returns the immutable map of condition key name to definition.
-
getConditionKey
public java.util.Optional<ConditionKeyDefinition> getConditionKey(java.lang.String name)
Get a specific condition key by name.- Parameters:
name
- Name of the condition key to get.- Returns:
- Returns the optionall found condition key.
-
createNode
protected Node createNode()
Description copied from class:AbstractTrait
The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
createNode
in classAbstractTrait
- Returns:
- Returns the trait as a node.
-
toBuilder
public DefineConditionKeysTrait.Builder toBuilder()
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<DefineConditionKeysTrait>
- Returns:
- a builder for type T
-
-