Class WebSocketRouteOptions.Builder
java.lang.Object
software.amazon.awscdk.services.apigatewayv2.WebSocketRouteOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WebSocketRouteOptions>
- Enclosing interface:
WebSocketRouteOptions
@Stability(Stable)
public static final class WebSocketRouteOptions.Builder
extends Object
implements software.amazon.jsii.Builder<WebSocketRouteOptions>
A builder for
WebSocketRouteOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthorizer
(IWebSocketRouteAuthorizer authorizer) Sets the value ofWebSocketRouteOptions.getAuthorizer()
build()
Builds the configured instance.integration
(WebSocketRouteIntegration integration) Sets the value ofWebSocketRouteOptions.getIntegration()
returnResponse
(Boolean returnResponse) Sets the value ofWebSocketRouteOptions.getReturnResponse()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
integration
@Stability(Stable) public WebSocketRouteOptions.Builder integration(WebSocketRouteIntegration integration) Sets the value ofWebSocketRouteOptions.getIntegration()
- Parameters:
integration
- The integration to be configured on this route. This parameter is required.- Returns:
this
-
authorizer
@Stability(Stable) public WebSocketRouteOptions.Builder authorizer(IWebSocketRouteAuthorizer authorizer) Sets the value ofWebSocketRouteOptions.getAuthorizer()
- Parameters:
authorizer
- The authorize to this route. You can only set authorizer to a $connect route.- Returns:
this
-
returnResponse
Sets the value ofWebSocketRouteOptions.getReturnResponse()
- Parameters:
returnResponse
- Should the route send a response to the client.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<WebSocketRouteOptions>
- Returns:
- a new instance of
WebSocketRouteOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-