Class IntegrationResponse.Builder
java.lang.Object
software.amazon.smithy.aws.apigateway.traits.IntegrationResponse.Builder
- All Implemented Interfaces:
SmithyBuilder<IntegrationResponse>
- Enclosing class:
- IntegrationResponse
public static final class IntegrationResponse.Builder
extends Object
implements SmithyBuilder<IntegrationResponse>
Builds a
IntegrationResponse
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates an immutable object that is created from the properties that have been set on the builder.contentHandling
(String contentHandling) Sets the content handling of the response template.putResponseParameter
(String name, String value) Sets a response parameter mapping.putResponseTemplate
(String mimeType, String template) Adds a response template for a MIME type.Removes a response parameter mapping.removeResponseTemplate
(String mimeType) Remove a response template for a given MIME type.responseParameters
(Map<String, String> responseParameters) Sets response parameter mappings.responseTemplates
(Map<String, String> responseTemplates) Sets a mapping of response MIME types to templates.statusCode
(String statusCode) Sets the status code of the response.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<IntegrationResponse>
- Returns:
- an instance of T
-
statusCode
Sets the status code of the response.- Parameters:
statusCode
- HTTP response status code.- Returns:
- Returns the builder.
- See Also:
-
contentHandling
Sets the content handling of the response template.- Parameters:
contentHandling
- Content handling strategy to set.- Returns:
- Returns the builder.
- See Also:
-
responseTemplates
Sets a mapping of response MIME types to templates.- Parameters:
responseTemplates
- Map of MIME types to response templates.- Returns:
- Returns the builder.
- See Also:
-
putResponseTemplate
Adds a response template for a MIME type.- Parameters:
mimeType
- MIME type of the response template.template
- Response template for the payload.- Returns:
- Returns the builder.
- See Also:
-
removeResponseTemplate
Remove a response template for a given MIME type.- Parameters:
mimeType
- MIME type to remove.- Returns:
- Returns the builder.
-
responseParameters
Sets response parameter mappings.- Parameters:
responseParameters
- Map of response expressions to expressions to apply to response.- Returns:
- Returns the builder.
- See Also:
-
putResponseParameter
Sets a response parameter mapping.- Parameters:
name
- Name of the expression to extract.value
- Expression used to apply in the response.- Returns:
- Returns the builder.
- See Also:
-
removeResponseParameter
Removes a response parameter mapping.- Parameters:
name
- Expression to remove.- Returns:
- Returns the builder.
-