Class: AWSCDK::APIGatewayv2Integrations::WebSocketMockIntegrationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2Integrations::WebSocketMockIntegrationProps
- Defined in:
- api_gatewayv2_integrations/web_socket_mock_integration_props.rb
Overview
Props for Mock type integration for a WebSocket Api.
Instance Attribute Summary collapse
-
#request_templates ⇒ Hash{String => String}?
readonly
A map of Apache Velocity templates that are applied on the request payload.
-
#template_selection_expression ⇒ String?
readonly
The template selection expression for the integration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(request_templates: nil, template_selection_expression: nil) ⇒ WebSocketMockIntegrationProps
constructor
A new instance of WebSocketMockIntegrationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(request_templates: nil, template_selection_expression: nil) ⇒ WebSocketMockIntegrationProps
Returns a new instance of WebSocketMockIntegrationProps.
9 10 11 12 13 14 |
# File 'api_gatewayv2_integrations/web_socket_mock_integration_props.rb', line 9 def initialize(request_templates: nil, template_selection_expression: nil) @request_templates = request_templates Jsii::Type.check_type(@request_templates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "requestTemplates") unless @request_templates.nil? @template_selection_expression = template_selection_expression Jsii::Type.check_type(@template_selection_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateSelectionExpression") unless @template_selection_expression.nil? end |
Instance Attribute Details
#request_templates ⇒ Hash{String => String}? (readonly)
Note:
Default: - No request template provided to the integration.
A map of Apache Velocity templates that are applied on the request payload.
{ "application/json": "{ \"statusCode\": 200 }" }
25 26 27 |
# File 'api_gatewayv2_integrations/web_socket_mock_integration_props.rb', line 25 def request_templates @request_templates end |
#template_selection_expression ⇒ String? (readonly)
Note:
Default: - No template selection expression provided.
The template selection expression for the integration.
30 31 32 |
# File 'api_gatewayv2_integrations/web_socket_mock_integration_props.rb', line 30 def template_selection_expression @template_selection_expression end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 |
# File 'api_gatewayv2_integrations/web_socket_mock_integration_props.rb', line 32 def self.jsii_properties { :request_templates => "requestTemplates", :template_selection_expression => "templateSelectionExpression", } end |
Instance Method Details
#to_jsii ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'api_gatewayv2_integrations/web_socket_mock_integration_props.rb', line 39 def to_jsii result = {} result.merge!({ "requestTemplates" => @request_templates, "templateSelectionExpression" => @template_selection_expression, }) result.compact end |