Class: Vapi::UpdateAzureCredentialDto
- Inherits:
-
Object
- Object
- Vapi::UpdateAzureCredentialDto
- Defined in:
- lib/vapi_server_sdk/types/update_azure_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.
-
#api_key ⇒ String
readonly
This is not returned in the API.
-
#bucket_plan ⇒ Vapi::AzureBlobStorageBucketPlan
readonly
This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.
-
#fallback_index ⇒ Float
readonly
This is the order in which this storage provider is tried during upload retries.
-
#name ⇒ String
readonly
This is the name of credential.
-
#region ⇒ Vapi::UpdateAzureCredentialDtoRegion
readonly
This is the region of the Azure resource.
-
#service ⇒ Vapi::UpdateAzureCredentialDtoService
readonly
This is the service being used in Azure.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::UpdateAzureCredentialDto
Deserialize a JSON object to an instance of UpdateAzureCredentialDto.
-
.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(service: OMIT, region: OMIT, api_key: OMIT, fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) ⇒ Vapi::UpdateAzureCredentialDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of UpdateAzureCredentialDto to a JSON object.
Constructor Details
#initialize(service: OMIT, region: OMIT, api_key: OMIT, fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) ⇒ Vapi::UpdateAzureCredentialDto
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 43 def initialize(service: OMIT, region: OMIT, api_key: OMIT, fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) @service = service if service != OMIT @region = region if region != OMIT @api_key = api_key if api_key != OMIT @fallback_index = fallback_index if fallback_index != OMIT @name = name if name != OMIT @bucket_plan = bucket_plan if bucket_plan != OMIT @additional_properties = additional_properties @_field_set = { "service": service, "region": region, "apiKey": api_key, "fallbackIndex": fallback_index, "name": name, "bucketPlan": bucket_plan }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
26 27 28 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 26 def additional_properties @additional_properties end |
#api_key ⇒ String (readonly)
Returns This is not returned in the API.
16 17 18 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 16 def api_key @api_key end |
#bucket_plan ⇒ Vapi::AzureBlobStorageBucketPlan (readonly)
Returns This is the bucket plan that can be provided to store call artifacts in Azure Blob Storage.
24 25 26 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 24 def bucket_plan @bucket_plan end |
#fallback_index ⇒ Float (readonly)
Returns This is the order in which this storage provider is tried during upload retries. Lower numbers are tried first in increasing order.
19 20 21 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 19 def fallback_index @fallback_index end |
#name ⇒ String (readonly)
Returns This is the name of credential. This is just for your reference.
21 22 23 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 21 def name @name end |
#region ⇒ Vapi::UpdateAzureCredentialDtoRegion (readonly)
Returns This is the region of the Azure resource.
14 15 16 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 14 def region @region end |
#service ⇒ Vapi::UpdateAzureCredentialDtoService (readonly)
Returns This is the service being used in Azure.
12 13 14 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 12 def service @service end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::UpdateAzureCredentialDto
Deserialize a JSON object to an instance of UpdateAzureCredentialDto
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 68 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) service = parsed_json["service"] region = parsed_json["region"] api_key = parsed_json["apiKey"] fallback_index = parsed_json["fallbackIndex"] name = parsed_json["name"] if parsed_json["bucketPlan"].nil? bucket_plan = nil else bucket_plan = parsed_json["bucketPlan"].to_json bucket_plan = Vapi::AzureBlobStorageBucketPlan.from_json(json_object: bucket_plan) end new( service: service, region: region, api_key: api_key, fallback_index: fallback_index, name: name, bucket_plan: bucket_plan, 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.
106 107 108 109 110 111 112 113 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 106 def self.validate_raw(obj:) obj.service&.is_a?(Vapi::UpdateAzureCredentialDtoService) != false || raise("Passed value for field obj.service is not the expected type, validation failed.") obj.region&.is_a?(Vapi::UpdateAzureCredentialDtoRegion) != false || raise("Passed value for field obj.region is not the expected type, validation failed.") obj.api_key&.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.") obj.fallback_index&.is_a?(Float) != false || raise("Passed value for field obj.fallback_index 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.") obj.bucket_plan.nil? || Vapi::AzureBlobStorageBucketPlan.validate_raw(obj: obj.bucket_plan) end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of UpdateAzureCredentialDto to a JSON object
96 97 98 |
# File 'lib/vapi_server_sdk/types/update_azure_credential_dto.rb', line 96 def to_json(*_args) @_field_set&.to_json end |