Class TraceMetadata
java.lang.Object
software.amazon.smithy.codegen.core.trace.TraceMetadata
- All Implemented Interfaces:
ToNode
,ToSmithyBuilder<TraceMetadata>
Class that defines information a code-generated artifact.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TraceMetadata.Builder
builder()
static TraceMetadata
Instantiates TraceMetadata instance variables using an ObjectNode that contains the artifact section of the trace file.Gets this TraceMetadata's Homepage in an Optional container.getId()
Gets this TraceMetadata's id.Gets this TraceMetadata's timestamp.getType()
Gets this TraceMetadata's type.Gets this TraceMetadata's TypeVersion in an Optional container.Gets this TraceMetadata's version (for example, the AWS SDK release number).Take this object and create a builder that contains all of the current property values of this object.toNode()
Converts the metadata contained in TraceMetadata's variables into an ObjectNode.
-
Field Details
-
ID_TEXT
- See Also:
-
VERSION_TEXT
- See Also:
-
TYPE_TEXT
- See Also:
-
TYPE_VERSION_TEXT
- See Also:
-
HOMEPAGE_TEXT
- See Also:
-
TIMESTAMP_TEXT
- See Also:
-
-
Method Details
-
fromNode
Instantiates TraceMetadata instance variables using an ObjectNode that contains the artifact section of the trace file.- Parameters:
value
- an ObjectNode that contains all children of the artifact tag in the trace file- Returns:
- TraceMetadata produced by deserializing the node.
-
builder
-
toNode
Converts the metadata contained in TraceMetadata's variables into an ObjectNode. -
getId
Gets this TraceMetadata's id. The id is the identifier of the artifact. For example, Java packages should use the Maven artifact ID.- Returns:
- TraceMetadata's id
-
getVersion
Gets this TraceMetadata's version (for example, the AWS SDK release number).- Returns:
- TraceMetadata's version
-
getTimestamp
Gets this TraceMetadata's timestamp. The timestamp is the RFC 3339 date and time that the artifact was created.- Returns:
- TraceMetadata's timestamp
-
getType
Gets this TraceMetadata's type. For code generation, this is the programming language.- Returns:
- TraceMetadata's type
-
getTypeVersion
Gets this TraceMetadata's TypeVersion in an Optional container. For example, when defining trace files for Java source code, the typeVersion would be the minimum supported JDK version. Different artifacts may have different output based on the version targets (for example the ability to use more features in a newer version of a language).- Returns:
- Optional container with type version or empty container if TypeVersion has not been set.
-
getHomepage
Gets this TraceMetadata's Homepage in an Optional container. The homepage is the homepage URL of the artifact.- Returns:
- Optional container with homepage or empty container if homepage has not been set
-
toBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<TraceMetadata>
- Returns:
- a builder for type T
-