Class RequestValidatorOptions.Builder
java.lang.Object
software.amazon.awscdk.services.apigateway.RequestValidatorOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RequestValidatorOptions>
- Enclosing interface:
- RequestValidatorOptions
@Stability(Stable)
public static final class RequestValidatorOptions.Builder
extends Object
implements software.amazon.jsii.Builder<RequestValidatorOptions>
A builder for
RequestValidatorOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.requestValidatorName
(String requestValidatorName) Sets the value ofRequestValidatorOptions.getRequestValidatorName()
validateRequestBody
(Boolean validateRequestBody) Sets the value ofRequestValidatorOptions.getValidateRequestBody()
validateRequestParameters
(Boolean validateRequestParameters) Sets the value ofRequestValidatorOptions.getValidateRequestParameters()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
requestValidatorName
@Stability(Stable) public RequestValidatorOptions.Builder requestValidatorName(String requestValidatorName) Sets the value ofRequestValidatorOptions.getRequestValidatorName()
- Parameters:
requestValidatorName
- The name of this request validator.- Returns:
this
-
validateRequestBody
@Stability(Stable) public RequestValidatorOptions.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 RequestValidatorOptions.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<RequestValidatorOptions>
- Returns:
- a new instance of
RequestValidatorOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-