Class: Vapi::AzureBlobStorageBucketPlan
- Inherits:
-
Object
- Object
- Vapi::AzureBlobStorageBucketPlan
- Defined in:
- lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#connection_string ⇒ String
readonly
This is the blob storage connection string for the Azure resource.
-
#container_name ⇒ String
readonly
This is the container name for the Azure blob storage.
-
#path ⇒ String
readonly
This is the path where call artifacts will be stored.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::AzureBlobStorageBucketPlan
Deserialize a JSON object to an instance of AzureBlobStorageBucketPlan.
-
.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(connection_string:, container_name:, path: OMIT, additional_properties: nil) ⇒ Vapi::AzureBlobStorageBucketPlan constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of AzureBlobStorageBucketPlan to a JSON object.
Constructor Details
#initialize(connection_string:, container_name:, path: OMIT, additional_properties: nil) ⇒ Vapi::AzureBlobStorageBucketPlan
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 37 def initialize(connection_string:, container_name:, path: OMIT, additional_properties: nil) @connection_string = connection_string @container_name = container_name @path = path if path != OMIT @additional_properties = additional_properties @_field_set = { "connectionString": connection_string, "containerName": container_name, "path": path }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
20 21 22 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 20 def additional_properties @additional_properties end |
#connection_string ⇒ String (readonly)
9 10 11 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 9 def connection_string @connection_string end |
#container_name ⇒ String (readonly)
11 12 13 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 11 def container_name @container_name end |
#path ⇒ String (readonly)
18 19 20 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 18 def path @path end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::AzureBlobStorageBucketPlan
Deserialize a JSON object to an instance of AzureBlobStorageBucketPlan
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 55 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) connection_string = parsed_json["connectionString"] container_name = parsed_json["containerName"] path = parsed_json["path"] new( connection_string: connection_string, container_name: container_name, path: path, 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.
82 83 84 85 86 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 82 def self.validate_raw(obj:) obj.connection_string.is_a?(String) != false || raise("Passed value for field obj.connection_string is not the expected type, validation failed.") obj.container_name.is_a?(String) != false || raise("Passed value for field obj.container_name is not the expected type, validation failed.") obj.path&.is_a?(String) != false || raise("Passed value for field obj.path is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of AzureBlobStorageBucketPlan to a JSON object
72 73 74 |
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 72 def to_json(*_args) @_field_set&.to_json end |