Class GatewayResponseProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.GatewayResponseProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GatewayResponseProps>
- Enclosing interface:
- GatewayResponseProps
@Stability(Stable)
public static final class GatewayResponseProps.Builder
extends Object
implements software.amazon.jsii.Builder<GatewayResponseProps>
A builder for
GatewayResponseProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.responseHeaders
(Map<String, String> responseHeaders) Sets the value ofGatewayResponseOptions.getResponseHeaders()
Sets the value ofGatewayResponseProps.getRestApi()
statusCode
(String statusCode) Sets the value ofGatewayResponseOptions.getStatusCode()
Sets the value ofGatewayResponseOptions.getTemplates()
type
(ResponseType type) Sets the value ofGatewayResponseOptions.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
restApi
Sets the value ofGatewayResponseProps.getRestApi()
- Parameters:
restApi
- Rest api resource to target. This parameter is required.- Returns:
this
-
type
Sets the value ofGatewayResponseOptions.getType()
- Parameters:
type
- Response type to associate with gateway response. This parameter is required.- Returns:
this
-
responseHeaders
@Stability(Stable) public GatewayResponseProps.Builder responseHeaders(Map<String, String> responseHeaders) Sets the value ofGatewayResponseOptions.getResponseHeaders()
- Parameters:
responseHeaders
- Custom headers parameters for response.- Returns:
this
-
statusCode
Sets the value ofGatewayResponseOptions.getStatusCode()
- Parameters:
statusCode
- Http status code for response.- Returns:
this
-
templates
Sets the value ofGatewayResponseOptions.getTemplates()
- Parameters:
templates
- Custom templates to get mapped as response.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GatewayResponseProps>
- Returns:
- a new instance of
GatewayResponseProps
- Throws:
NullPointerException
- if any required attribute was not provided
-