Class: Vapi::CreateAzureOpenAiCredentialDto
- Inherits:
-
Object
- Object
- Vapi::CreateAzureOpenAiCredentialDto
- Defined in:
- lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #models ⇒ Array<Vapi::CreateAzureOpenAiCredentialDtoModelsItem> readonly
- #open_ai_endpoint ⇒ String readonly
-
#open_ai_key ⇒ String
readonly
This is not returned in the API.
- #provider ⇒ String readonly
- #region ⇒ Vapi::CreateAzureOpenAiCredentialDtoRegion readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::CreateAzureOpenAiCredentialDto
Deserialize a JSON object to an instance of CreateAzureOpenAiCredentialDto.
-
.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(provider:, region:, models:, open_ai_key:, open_ai_endpoint:, additional_properties: nil) ⇒ Vapi::CreateAzureOpenAiCredentialDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of CreateAzureOpenAiCredentialDto to a JSON object.
Constructor Details
#initialize(provider:, region:, models:, open_ai_key:, open_ai_endpoint:, additional_properties: nil) ⇒ Vapi::CreateAzureOpenAiCredentialDto
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 35 def initialize(provider:, region:, models:, open_ai_key:, open_ai_endpoint:, additional_properties: nil) @provider = provider @region = region @models = models @open_ai_key = open_ai_key @open_ai_endpoint = open_ai_endpoint @additional_properties = additional_properties @_field_set = { "provider": provider, "region": region, "models": models, "openAIKey": open_ai_key, "openAIEndpoint": open_ai_endpoint } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 21 def additional_properties @additional_properties end |
#models ⇒ Array<Vapi::CreateAzureOpenAiCredentialDtoModelsItem> (readonly)
15 16 17 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 15 def models @models end |
#open_ai_endpoint ⇒ String (readonly)
19 20 21 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 19 def open_ai_endpoint @open_ai_endpoint end |
#open_ai_key ⇒ String (readonly)
Returns This is not returned in the API.
17 18 19 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 17 def open_ai_key @open_ai_key end |
#provider ⇒ String (readonly)
11 12 13 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 11 def provider @provider end |
#region ⇒ Vapi::CreateAzureOpenAiCredentialDtoRegion (readonly)
13 14 15 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 13 def region @region end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::CreateAzureOpenAiCredentialDto
Deserialize a JSON object to an instance of CreateAzureOpenAiCredentialDto
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 55 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) provider = parsed_json["provider"] region = parsed_json["region"] models = parsed_json["models"] open_ai_key = parsed_json["openAIKey"] open_ai_endpoint = parsed_json["openAIEndpoint"] new( provider: provider, region: region, models: models, open_ai_key: open_ai_key, open_ai_endpoint: open_ai_endpoint, 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.
86 87 88 89 90 91 92 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 86 def self.validate_raw(obj:) obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.") obj.region.is_a?(Vapi::CreateAzureOpenAiCredentialDtoRegion) != false || raise("Passed value for field obj.region is not the expected type, validation failed.") obj.models.is_a?(Array) != false || raise("Passed value for field obj.models is not the expected type, validation failed.") obj.open_ai_key.is_a?(String) != false || raise("Passed value for field obj.open_ai_key is not the expected type, validation failed.") obj.open_ai_endpoint.is_a?(String) != false || raise("Passed value for field obj.open_ai_endpoint is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of CreateAzureOpenAiCredentialDto to a JSON object
76 77 78 |
# File 'lib/vapi_server_sdk/types/create_azure_open_ai_credential_dto.rb', line 76 def to_json(*_args) @_field_set&.to_json end |