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 java.lang.Object implements SmithyBuilder<TraceFile>
Builder for constructing TraceFile's from scratch.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TraceFile.Builder
addShapeLink(java.lang.String idString, ShapeLink link)
Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.TraceFile.Builder
addShapeLink(ShapeId id, ShapeLink link)
Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.TraceFile.Builder
addShapeLinks(java.lang.String idString, java.util.List<ShapeLink> linkList)
Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.TraceFile.Builder
addShapeLinks(ShapeId id, java.util.List<ShapeLink> linkList)
Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.TraceFile
build()
Creates an immutable object that is created from the properties that have been set on the builder.TraceFile.Builder
definitions(ArtifactDefinitions artifactDefinitions)
TraceFile.Builder
metadata(TraceMetadata metadata)
TraceFile.Builder
shapes(java.util.Map<ShapeId,java.util.List<ShapeLink>> shapes)
TraceFile.Builder
smithyTrace(java.lang.String smithyTrace)
-
-
-
Method Detail
-
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 interfaceSmithyBuilder<TraceFile>
- Returns:
- The TraceFile.
-
smithyTrace
public TraceFile.Builder smithyTrace(java.lang.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
- ShapeIdlink
- ShapeLink corresponding to ShapeId- Returns:
- This builder.
-
addShapeLink
public TraceFile.Builder addShapeLink(java.lang.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, java.util.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(java.lang.String idString, java.util.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(java.util.Map<ShapeId,java.util.List<ShapeLink>> shapes)
- Parameters:
shapes
- shapes map for TraceFile.- Returns:
- This builder.
-
-