Class TraceFile.Builder
java.lang.Object
software.amazon.smithy.codegen.core.trace.TraceFile.Builder
- All Implemented Interfaces:
software.amazon.smithy.utils.SmithyBuilder<TraceFile>
- Enclosing class:
- TraceFile
public static final class TraceFile.Builder
extends Object
implements software.amazon.smithy.utils.SmithyBuilder<TraceFile>
Builder for constructing TraceFile's from scratch.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddShapeLink
(String idString, ShapeLink link) Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.addShapeLink
(software.amazon.smithy.model.shapes.ShapeId id, ShapeLink link) Adds a ShapeLink to this ShapeId in the TraceFile's shapes map.addShapeLinks
(String idString, List<ShapeLink> linkList) Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.addShapeLinks
(software.amazon.smithy.model.shapes.ShapeId id, List<ShapeLink> linkList) Adds a list of ShapeLinks to this ShapeId in the TraceFile's shapes map.build()
definitions
(ArtifactDefinitions artifactDefinitions) metadata
(TraceMetadata metadata) smithyTrace
(String smithyTrace)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
- Specified by:
build
in interfacesoftware.amazon.smithy.utils.SmithyBuilder<TraceFile>
- Returns:
- The TraceFile.
-
smithyTrace
- Parameters:
smithyTrace
- Trace file version number.- Returns:
- This builder.
-
definitions
- Parameters:
artifactDefinitions
- Trace file definitions.- Returns:
- This builder.
-
metadata
- Parameters:
metadata
- Trace file TraceMetadata.- Returns:
- This builder.
-
addShapeLink
public TraceFile.Builder addShapeLink(software.amazon.smithy.model.shapes.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
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(software.amazon.smithy.model.shapes.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
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<software.amazon.smithy.model.shapes.ShapeId, List<ShapeLink>> shapes) - Parameters:
shapes
- shapes map for TraceFile.- Returns:
- This builder.
-