Class: Vapi::ServerMessageResponseCallEndpointingRequest
- Inherits:
-
Object
- Object
- Vapi::ServerMessageResponseCallEndpointingRequest
- Defined in:
- lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#timeout_seconds ⇒ Float
readonly
This is the timeout in seconds to wait before considering the user’s speech as finished.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::ServerMessageResponseCallEndpointingRequest
Deserialize a JSON object to an instance of ServerMessageResponseCallEndpointingRequest.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(timeout_seconds:, additional_properties: nil) ⇒ Vapi::ServerMessageResponseCallEndpointingRequest constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of ServerMessageResponseCallEndpointingRequest to a JSON object.
Constructor Details
#initialize(timeout_seconds:, additional_properties: nil) ⇒ Vapi::ServerMessageResponseCallEndpointingRequest
23 24 25 26 27 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 23 def initialize(timeout_seconds:, additional_properties: nil) @timeout_seconds = timeout_seconds @additional_properties = additional_properties @_field_set = { "timeoutSeconds": timeout_seconds } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
12 13 14 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 12 def additional_properties @additional_properties end |
#timeout_seconds ⇒ Float (readonly)
Returns This is the timeout in seconds to wait before considering the user’s speech as finished.
10 11 12 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 10 def timeout_seconds @timeout_seconds end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::ServerMessageResponseCallEndpointingRequest
Deserialize a JSON object to an instance of
ServerMessageResponseCallEndpointingRequest
34 35 36 37 38 39 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 34 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) timeout_seconds = parsed_json["timeoutSeconds"] new(timeout_seconds: timeout_seconds, additional_properties: struct) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
55 56 57 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 55 def self.validate_raw(obj:) obj.timeout_seconds.is_a?(Float) != false || raise("Passed value for field obj.timeout_seconds is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of ServerMessageResponseCallEndpointingRequest to a JSON
object
45 46 47 |
# File 'lib/vapi_server_sdk/types/server_message_response_call_endpointing_request.rb', line 45 def to_json(*_args) @_field_set&.to_json end |