Class TaggableTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.aws.traits.tagging.TaggableTrait
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,ToShapeId,Trait,ToSmithyBuilder<TaggableTrait>
public final class TaggableTrait extends AbstractTrait implements ToSmithyBuilder<TaggableTrait>
Marks a resource shape as taggable for further model validation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTaggableTrait.Builderstatic classTaggableTrait.Provider
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaggableTrait.Builderbuilder()protected NodecreateNode()The result of toNode is used for hashCodes and equality.java.util.Optional<TaggableApiConfig>getApiConfig()Gets the TaggableApiConfig if the resource has its own APIs for tagging.booleangetDisableSystemTags()Gets a boolean indicating whether or not the service supports the resource carrying system tags.java.util.Optional<java.lang.String>getProperty()Gets the name of the property that represents the tags on the resource, if any.TaggableTrait.BuildertoBuilder()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, setNodeCache, toNode, toShapeId, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
-
-
-
Field Detail
-
ID
public static final ShapeId ID
-
-
Method Detail
-
getDisableSystemTags
public boolean getDisableSystemTags()
Gets a boolean indicating whether or not the service supports the resource carrying system tags.- Returns:
- Returns true if the service does not support the resource carrying system tags.
-
getApiConfig
public java.util.Optional<TaggableApiConfig> getApiConfig()
Gets the TaggableApiConfig if the resource has its own APIs for tagging.- Returns:
- the TaggableApiConfig for the resource.
-
getProperty
public java.util.Optional<java.lang.String> getProperty()
Gets the name of the property that represents the tags on the resource, if any.- Returns:
- the name of the property that represents the tags of the resource.
-
createNode
protected Node createNode()
Description copied from class:AbstractTraitThe 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:
createNodein classAbstractTrait- Returns:
- Returns the trait as a node.
-
builder
public static TaggableTrait.Builder builder()
-
toBuilder
public TaggableTrait.Builder toBuilder()
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<TaggableTrait>- Returns:
- a builder for type T
-
-