Class GenerateServiceDirective<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<ServiceShape,C,S>
software.amazon.smithy.codegen.core.directed.GenerateServiceDirective<C,S>
- Type Parameters:
C
- CodegenContext type.S
- Codegen settings type.
public final class GenerateServiceDirective<C extends CodegenContext<S,?,?>,S>
extends ShapeDirective<ServiceShape,C,S>
Directive used to generate a service.
-
Method Summary
Modifier and TypeMethodDescriptionGet a map of operations that use an event stream in their input.Get a map of operations that use an event stream in their output.Gets theTitleTrait
value of the service if present, otherwise returns theSymbol.getName()
value of the service.serviceTitle
(String fallback) Attempts to get the title of service from the model, returning the fallback value if the service does not have aTitleTrait
.Methods inherited from class software.amazon.smithy.codegen.core.directed.ShapeDirective
shape, symbol
Methods inherited from class software.amazon.smithy.codegen.core.directed.ContextualDirective
context, fileManifest, symbolProvider
Methods inherited from class software.amazon.smithy.codegen.core.directed.Directive
connectedShapes, model, operations, service, settings
-
Method Details
-
serviceTitle
Gets theTitleTrait
value of the service if present, otherwise returns theSymbol.getName()
value of the service.- Returns:
- title of service
-
serviceTitle
Attempts to get the title of service from the model, returning the fallback value if the service does not have aTitleTrait
.- Parameters:
fallback
- string to return if service does not have a title- Returns:
- title of service
-
inputEventStreamOperations
Get a map of operations that use an event stream in their input.- Returns:
- Returns a map of operation shape IDs to their event stream information.
- See Also:
-
outputEventStreamOperations
Get a map of operations that use an event stream in their output.- Returns:
- Returns a map of operation shape IDs to their event stream information.
- See Also:
-