Class TraceFile.Builder

java.lang.Object
software.amazon.smithy.codegen.core.trace.TraceFile.Builder
All Implemented Interfaces:
SmithyBuilder<TraceFile>
Enclosing class:
TraceFile

public static final class TraceFile.Builder extends Object implements SmithyBuilder<TraceFile>
Builder for constructing TraceFile's from scratch.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public TraceFile build()
      Description copied from interface: SmithyBuilder
      Creates an immutable object that is created from the properties that have been set on the builder.
      Specified by:
      build in interface SmithyBuilder<TraceFile>
      Returns:
      The TraceFile.
    • smithyTrace

      public TraceFile.Builder smithyTrace(String smithyTrace)
      Parameters:
      smithyTrace - Trace file version number.
      Returns:
      This builder.
    • definitions

      public TraceFile.Builder definitions(ArtifactDefinitions artifactDefinitions)
      Parameters:
      artifactDefinitions - Trace file definitions.
      Returns:
      This builder.
    • metadata

      public TraceFile.Builder metadata(TraceMetadata metadata)
      Parameters:
      metadata - Trace file TraceMetadata.
      Returns:
      This builder.
    • addShapeLink

      public TraceFile.Builder addShapeLink(ShapeId id, ShapeLink link)
      Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.
      Parameters:
      id - ShapeId
      link - ShapeLink corresponding to ShapeId
      Returns:
      This builder.
    • addShapeLink

      public TraceFile.Builder addShapeLink(String idString, ShapeLink link)
      Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.
      Parameters:
      idString - ShapeId represented as a string.
      link - ShapeLink corresponding to ShapeId
      Returns:
      This builder.
    • addShapeLinks

      public TraceFile.Builder addShapeLinks(ShapeId id, List<ShapeLink> linkList)
      Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.
      Parameters:
      id - ShapeId.
      linkList - List of ShapeLinks corresponding to a ShapeId.
      Returns:
      This builder.
    • addShapeLinks

      public TraceFile.Builder addShapeLinks(String idString, List<ShapeLink> linkList)
      Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.
      Parameters:
      idString - ShapeId as a String.
      linkList - List of ShapeLinks corresponding to a ShapeId.
      Returns:
      This builder.
    • shapes

      public TraceFile.Builder shapes(Map<ShapeId,List<ShapeLink>> shapes)
      Parameters:
      shapes - shapes map for TraceFile.
      Returns:
      This builder.