Class MockIntegrationTrait
java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.aws.apigateway.traits.MockIntegrationTrait
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,ToShapeId
,Trait
,ToSmithyBuilder<MockIntegrationTrait>
public final class MockIntegrationTrait
extends AbstractTrait
implements ToSmithyBuilder<MockIntegrationTrait>
API Gateway mock integration.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MockIntegrationTrait.Builder
builder()
protected ObjectNode
The result of toNode is used for hashCodes and equality.Gets the contentHandling property of the integration.Gets the pass through behavior of the integration.getRequestParameter
(String expression) Get a specific request parameter by input expression.Gets the request parameter mappings of the integration.getRequestTemplate
(String mimeType) Gets a specific request template by MIME type.Gets all request templates of the integration.getResponse
(String statusCode) Get a specific integration response by status code expression.Gets all integration responses.Take this object and create a builder that contains all of the current property values of this object.Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
Field Details
-
ID
-
-
Method Details
-
builder
-
getPassThroughBehavior
Gets the pass through behavior of the integration.Specifies how a request payload of unmapped content type is passed through the integration request without modification. Supported values are when_no_templates, when_no_match, and never.
- Returns:
- Returns the pass through setting.
- See Also:
-
getRequestParameters
Gets the request parameter mappings of the integration.Each key is an expression used to extract a value from the request, and each value is an expression of where to place the value in the downstream request. Supported request parameters are querystring, path, header, and body.
- Returns:
- Returns the request parameters.
- See Also:
-
getRequestParameter
Get a specific request parameter by input expression.- Parameters:
expression
- Expression to get.- Returns:
- Returns the optionally found request parameter.
-
getRequestTemplates
Gets all request templates of the integration.- Returns:
- Returns a map of MIME types to request templates.
- See Also:
-
getRequestTemplate
Gets a specific request template by MIME type.- Parameters:
mimeType
- MIME type to get.- Returns:
- Returns the optionally found template.
-
getResponses
Gets all integration responses.- Returns:
- Returns a map of status code regular expressions to responses.
- See Also:
-
getResponse
Get a specific integration response by status code expression.- Parameters:
statusCode
- Status code regular expression to search for.- Returns:
- Returns the optionally found response object.
-
getContentHandling
Gets the contentHandling property of the integration.- Returns:
- Returns the contentHandling property.
-
createNode
Description copied from class:AbstractTrait
The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
createNode
in classAbstractTrait
- Returns:
- Returns the trait as a node.
-
toBuilder
Description copied from interface:ToSmithyBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToSmithyBuilder<MockIntegrationTrait>
- Returns:
- a builder for type T
-