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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if this is a shape used exclusively for input.booleanCheck if this is a shape used exclusively for output.Methods inherited from class software.amazon.smithy.codegen.core.directed.ShapeDirective
shape, symbolMethods inherited from class software.amazon.smithy.codegen.core.directed.ContextualDirective
context, fileManifest, symbolProviderMethods inherited from class software.amazon.smithy.codegen.core.directed.Directive
connectedShapes, model, operations, service, settings
-
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
inputtrait. - 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
outputtrait. - See Also:
-
ModelTransformer.createDedicatedInputAndOutput(software.amazon.smithy.model.Model, java.lang.String, java.lang.String)
-