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 java.lang.Object implements SmithyBuilder<IntegrationResponse>
Builds aIntegrationResponse
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegrationResponse
build()
Creates an immutable object that is created from the properties that have been set on the builder.IntegrationResponse.Builder
contentHandling(java.lang.String contentHandling)
Sets the content handling of the response template.IntegrationResponse.Builder
putResponseParameter(java.lang.String name, java.lang.String value)
Sets a response parameter mapping.IntegrationResponse.Builder
putResponseTemplate(java.lang.String mimeType, java.lang.String template)
Adds a response template for a MIME type.IntegrationResponse.Builder
removeResponseParameter(java.lang.String name)
Removes a response parameter mapping.IntegrationResponse.Builder
removeResponseTemplate(java.lang.String mimeType)
Remove a response template for a given MIME type.IntegrationResponse.Builder
responseParameters(java.util.Map<java.lang.String,java.lang.String> responseParameters)
Sets response parameter mappings.IntegrationResponse.Builder
responseTemplates(java.util.Map<java.lang.String,java.lang.String> responseTemplates)
Sets a mapping of response MIME types to templates.IntegrationResponse.Builder
statusCode(java.lang.String statusCode)
Sets the status code of the response.
-
-
-
Method Detail
-
build
public IntegrationResponse 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
public IntegrationResponse.Builder statusCode(java.lang.String statusCode)
Sets the status code of the response.- Parameters:
statusCode
- HTTP response status code.- Returns:
- Returns the builder.
- See Also:
IntegrationResponse.getStatusCode()
-
contentHandling
public IntegrationResponse.Builder contentHandling(java.lang.String contentHandling)
Sets the content handling of the response template.- Parameters:
contentHandling
- Content handling strategy to set.- Returns:
- Returns the builder.
- See Also:
IntegrationResponse.getContentHandling()
-
responseTemplates
public IntegrationResponse.Builder responseTemplates(java.util.Map<java.lang.String,java.lang.String> 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:
IntegrationResponse.getResponseTemplates()
-
putResponseTemplate
public IntegrationResponse.Builder putResponseTemplate(java.lang.String mimeType, java.lang.String template)
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:
IntegrationResponse.getResponseTemplates()
-
removeResponseTemplate
public IntegrationResponse.Builder removeResponseTemplate(java.lang.String mimeType)
Remove a response template for a given MIME type.- Parameters:
mimeType
- MIME type to remove.- Returns:
- Returns the builder.
-
responseParameters
public IntegrationResponse.Builder responseParameters(java.util.Map<java.lang.String,java.lang.String> responseParameters)
Sets response parameter mappings.- Parameters:
responseParameters
- Map of response expressions to expressions to apply to response.- Returns:
- Returns the builder.
- See Also:
IntegrationResponse.getResponseParameters()
-
putResponseParameter
public IntegrationResponse.Builder putResponseParameter(java.lang.String name, java.lang.String value)
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:
IntegrationResponse.getResponseParameters()
-
removeResponseParameter
public IntegrationResponse.Builder removeResponseParameter(java.lang.String name)
Removes a response parameter mapping.- Parameters:
name
- Expression to remove.- Returns:
- Returns the builder.
-
-