Class: Vapi::AddVoiceToProviderDto
- Inherits:
-
Object
- Object
- Vapi::AddVoiceToProviderDto
- Defined in:
- lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#name ⇒ String
readonly
This is the new name of the voice which you want to have once you have added voice to your provider Account from Provider Voice Library.
-
#owner_id ⇒ String
readonly
This is the owner_id of your shared voice which you want to add to your provider Account from Provider Voice Library.
-
#voice_id ⇒ String
readonly
This is the voice_id of the shared voice which you want to add to your provider Account from Provider Voice Library.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::AddVoiceToProviderDto
Deserialize a JSON object to an instance of AddVoiceToProviderDto.
-
.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(owner_id:, voice_id:, name:, additional_properties: nil) ⇒ Vapi::AddVoiceToProviderDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of AddVoiceToProviderDto to a JSON object.
Constructor Details
#initialize(owner_id:, voice_id:, name:, additional_properties: nil) ⇒ Vapi::AddVoiceToProviderDto
33 34 35 36 37 38 39 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 33 def initialize(owner_id:, voice_id:, name:, additional_properties: nil) @owner_id = owner_id @voice_id = voice_id @name = name @additional_properties = additional_properties @_field_set = { "ownerId": owner_id, "voiceId": voice_id, "name": name } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
18 19 20 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 18 def additional_properties @additional_properties end |
#name ⇒ String (readonly)
Returns This is the new name of the voice which you want to have once you have added voice to your provider Account from Provider Voice Library.
16 17 18 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 16 def name @name end |
#owner_id ⇒ String (readonly)
Returns This is the owner_id of your shared voice which you want to add to your provider Account from Provider Voice Library.
10 11 12 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 10 def owner_id @owner_id end |
#voice_id ⇒ String (readonly)
Returns This is the voice_id of the shared voice which you want to add to your provider Account from Provider Voice Library.
13 14 15 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 13 def voice_id @voice_id end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::AddVoiceToProviderDto
Deserialize a JSON object to an instance of AddVoiceToProviderDto
45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 45 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) owner_id = parsed_json["ownerId"] voice_id = parsed_json["voiceId"] name = parsed_json["name"] new( owner_id: owner_id, voice_id: voice_id, name: name, 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.
72 73 74 75 76 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 72 def self.validate_raw(obj:) obj.owner_id.is_a?(String) != false || raise("Passed value for field obj.owner_id is not the expected type, validation failed.") obj.voice_id.is_a?(String) != false || raise("Passed value for field obj.voice_id is not the expected type, validation failed.") obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of AddVoiceToProviderDto to a JSON object
62 63 64 |
# File 'lib/vapi_server_sdk/types/add_voice_to_provider_dto.rb', line 62 def to_json(*_args) @_field_set&.to_json end |