Class GenerateStructureDirective<C extends CodegenContext<S,?,?>,S>

java.lang.Object
software.amazon.smithy.codegen.core.directed.Directive<S>
software.amazon.smithy.codegen.core.directed.ContextualDirective<C,S>
software.amazon.smithy.codegen.core.directed.ShapeDirective<software.amazon.smithy.model.shapes.StructureShape,C,S>
software.amazon.smithy.codegen.core.directed.GenerateStructureDirective<C,S>
Type Parameters:
C - CodegenContext type.
S - Codegen settings type.

public final class GenerateStructureDirective<C extends CodegenContext<S,?,?>,S> extends ShapeDirective<software.amazon.smithy.model.shapes.StructureShape,C,S>
Directive used to generate a structure.
See Also:
  • Method Details

    • isInputShape

      public boolean isInputShape()
      Check if this is a shape used exclusively for input.

      This is equivalent to calling shape().hasTrait(InputTrait.class).

      Use the CodegenDirector.createDedicatedInputsAndOutputs() method to ensure that every operation has a unique input shape marked with the input trait.

      Returns:
      Returns true if the shape is marked with the input trait.
      See Also:
      • ModelTransformer.createDedicatedInputAndOutput(software.amazon.smithy.model.Model, java.lang.String, java.lang.String)
    • isOutputShape

      public boolean isOutputShape()
      Check if this is a shape used exclusively for output.

      This is equivalent to calling shape().hasTrait(OutputTrait.class).

      Use the CodegenDirector.createDedicatedInputsAndOutputs() method to ensure that every operation has a unique output shape marked with the output trait.

      Returns:
      Returns true if the shape is marked with the output trait.
      See Also:
      • ModelTransformer.createDedicatedInputAndOutput(software.amazon.smithy.model.Model, java.lang.String, java.lang.String)