Class RequestValidatorProps.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.RequestValidatorProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RequestValidatorProps>
- Enclosing interface:
- RequestValidatorProps
@Stability(Stable)
public static final class RequestValidatorProps.Builder
extends Object
implements software.amazon.jsii.Builder<RequestValidatorProps>
A builder for
RequestValidatorProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.requestValidatorName
(String requestValidatorName) Sets the value ofRequestValidatorOptions.getRequestValidatorName()
Sets the value ofRequestValidatorProps.getRestApi()
validateRequestBody
(Boolean validateRequestBody) Sets the value ofRequestValidatorOptions.getValidateRequestBody()
validateRequestParameters
(Boolean validateRequestParameters) Sets the value ofRequestValidatorOptions.getValidateRequestParameters()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
restApi
Sets the value ofRequestValidatorProps.getRestApi()
- Parameters:
restApi
- The rest API that this model is part of. This parameter is required. The reason we need the RestApi object itself and not just the ID is because the model is being tracked by the top-level RestApi object for the purpose of calculating it's hash to determine the ID of the deployment. This allows us to automatically update the deployment when the model of the REST API changes.- Returns:
this
-
requestValidatorName
@Stability(Stable) public RequestValidatorProps.Builder requestValidatorName(String requestValidatorName) Sets the value ofRequestValidatorOptions.getRequestValidatorName()
- Parameters:
requestValidatorName
- The name of this request validator.- Returns:
this
-
validateRequestBody
@Stability(Stable) public RequestValidatorProps.Builder validateRequestBody(Boolean validateRequestBody) Sets the value ofRequestValidatorOptions.getValidateRequestBody()
- Parameters:
validateRequestBody
- Indicates whether to validate the request body according to the configured schema for the targeted API and method.- Returns:
this
-
validateRequestParameters
@Stability(Stable) public RequestValidatorProps.Builder validateRequestParameters(Boolean validateRequestParameters) Sets the value ofRequestValidatorOptions.getValidateRequestParameters()
- Parameters:
validateRequestParameters
- Indicates whether to validate request parameters.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RequestValidatorProps>
- Returns:
- a new instance of
RequestValidatorProps
- Throws:
NullPointerException
- if any required attribute was not provided
-