Class: LambdaOpenApi::Event
- Inherits:
-
Object
- Object
- LambdaOpenApi::Event
- Defined in:
- lib/lambda_open_api/event.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#http_method ⇒ Object
Returns the value of attribute http_method.
-
#is_base64_encoded ⇒ Object
Returns the value of attribute is_base64_encoded.
-
#multi_value_headers ⇒ Object
Returns the value of attribute multi_value_headers.
-
#multi_value_query_string_parameters ⇒ Object
Returns the value of attribute multi_value_query_string_parameters.
-
#path ⇒ Object
Returns the value of attribute path.
-
#path_parameters ⇒ Object
Returns the value of attribute path_parameters.
-
#query_string_parameters ⇒ Object
Returns the value of attribute query_string_parameters.
-
#request_context ⇒ Object
Returns the value of attribute request_context.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#stage_variables ⇒ Object
Returns the value of attribute stage_variables.
Instance Method Summary collapse
-
#initialize ⇒ Event
constructor
A new instance of Event.
- #json ⇒ Object
Constructor Details
#initialize ⇒ Event
Returns a new instance of Event.
16 17 18 |
# File 'lib/lambda_open_api/event.rb', line 16 def initialize @body = "{}" end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def headers @headers end |
#http_method ⇒ Object
Returns the value of attribute http_method.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def http_method @http_method end |
#is_base64_encoded ⇒ Object
Returns the value of attribute is_base64_encoded.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def is_base64_encoded @is_base64_encoded end |
#multi_value_headers ⇒ Object
Returns the value of attribute multi_value_headers.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def multi_value_headers @multi_value_headers end |
#multi_value_query_string_parameters ⇒ Object
Returns the value of attribute multi_value_query_string_parameters.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def multi_value_query_string_parameters @multi_value_query_string_parameters end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def path @path end |
#path_parameters ⇒ Object
Returns the value of attribute path_parameters.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def path_parameters @path_parameters end |
#query_string_parameters ⇒ Object
Returns the value of attribute query_string_parameters.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def query_string_parameters @query_string_parameters end |
#request_context ⇒ Object
Returns the value of attribute request_context.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def request_context @request_context end |
#resource ⇒ Object
Returns the value of attribute resource.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def resource @resource end |
#stage_variables ⇒ Object
Returns the value of attribute stage_variables.
3 4 5 |
# File 'lib/lambda_open_api/event.rb', line 3 def stage_variables @stage_variables end |
Instance Method Details
#json ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/lambda_open_api/event.rb', line 20 def json { "resource" => resource, "path" => path, "httpMethod" => http_method, "requestContext" => request_context, "headers" => headers, "multiValueHeaders" => multi_value_headers, "queryStringParameters" => query_string_parameters, "multiValueQueryStringParameters" => multi_value_query_string_parameters, "pathParameters" => path_parameters, "stageVariables" => stage_variables, "body" => body, "isBase64Encoded" => is_base64_encoded, "rawPath" => path } end |