Class TraceMetadata

All Implemented Interfaces:
ToNode, ToSmithyBuilder<TraceMetadata>

public final class TraceMetadata extends Object implements ToNode, ToSmithyBuilder<TraceMetadata>
Class that defines information a code-generated artifact.
  • Field Details

  • Method Details

    • fromNode

      public static TraceMetadata fromNode(Node value)
      Instantiates TraceMetadata instance variables using an ObjectNode that contains the artifact section of the trace file.
      value - an ObjectNode that contains all children of the artifact tag in the trace file
      TraceMetadata produced by deserializing the node.
    • builder

      public static TraceMetadata.Builder builder()
    • toNode

      public ObjectNode toNode()
      Converts the metadata contained in TraceMetadata's variables into an ObjectNode.
      Specified by:
      toNode in interface ToNode
      an ObjectNode with that contains StringNodes representing the trace file metadata
    • getId

      public String getId()
      Gets this TraceMetadata's id. The id is the identifier of the artifact. For example, Java packages should use the Maven artifact ID.
      TraceMetadata's id
    • getVersion

      public String getVersion()
      Gets this TraceMetadata's version (for example, the AWS SDK release number).
      TraceMetadata's version
    • getTimestamp

      public String getTimestamp()
      Gets this TraceMetadata's timestamp. The timestamp is the RFC 3339 date and time that the artifact was created.
      TraceMetadata's timestamp
    • getType

      public String getType()
      Gets this TraceMetadata's type. For code generation, this is the programming language.
      TraceMetadata's type
    • getTypeVersion

      public Optional<String> 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).
      Optional container with type version or empty container if TypeVersion has not been set.
    • getHomepage

      public Optional<String> getHomepage()
      Gets this TraceMetadata's Homepage in an Optional container. The homepage is the homepage URL of the artifact.
      Optional container with homepage or empty container if homepage has not been set
    • toBuilder

      public TraceMetadata.Builder toBuilder()
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<TraceMetadata>
      a builder for type T