Class SyntheticShapeTrait

java.lang.Object
software.amazon.smithy.model.traits.AnnotationTrait
software.amazon.smithy.model.traits.synthetic.SyntheticShapeTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait

public final class SyntheticShapeTrait extends AnnotationTrait
Marks a shape as assembler-generated (synthetic).

This trait is applied by the assembler to shapes created from inline collection syntax (e.g., [String] or {String: String}). It is not user-applicable.

The trait is defined in the prelude (smithy.api#synthetic) and is a normal persisted trait: it is serialized in the JSON AST so that AST consumers can tell generated shapes apart from authored ones. It is never serialized in the IDL; the IDL 2.1 inline collection syntax carries the same information.

  • Field Details

    • ID

      public static final ShapeId ID
  • Constructor Details

    • SyntheticShapeTrait

      public SyntheticShapeTrait()
    • SyntheticShapeTrait

      public SyntheticShapeTrait(ObjectNode node)