Class: Vapi::AzureBlobStorageBucketPlan

Inherits:
Object
  • Object
show all
Defined in:
lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection_string:, container_name:, path: OMIT, additional_properties: nil) ⇒ Vapi::AzureBlobStorageBucketPlan

Parameters:

  • connection_string (String)

    This is the blob storage connection string for the Azure resource.

  • container_name (String)

    This is the container name for the Azure blob storage.

  • path (String) (defaults to: OMIT)

    This is the path where call artifacts will be stored. Usage:

    • To store call artifacts in a specific folder, set this to the full path. Eg.

    “/folder-name1/folder-name2”.

    • To store call artifacts in the root of the bucket, leave this blank.

    @default “/”

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



20
21
22
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 20

def additional_properties
  @additional_properties
end

#connection_stringString (readonly)

Returns This is the blob storage connection string for the Azure resource.

Returns:

  • (String)

    This is the blob storage connection string for the Azure resource.



9
10
11
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 9

def connection_string
  @connection_string
end

#container_nameString (readonly)

Returns This is the container name for the Azure blob storage.

Returns:

  • (String)

    This is the container name for the Azure blob storage.



11
12
13
# File 'lib/vapi_server_sdk/types/azure_blob_storage_bucket_plan.rb', line 11

def container_name
  @container_name
end

#pathString (readonly)

Returns This is the path where call artifacts will be stored. Usage:

  • To store call artifacts in a specific folder, set this to the full path. Eg.

“/folder-name1/folder-name2”.

  • To store call artifacts in the root of the bucket, leave this blank.

@default “/”.

Returns:

  • (String)

    This is the path where call artifacts will be stored. Usage:

    • To store call artifacts in a specific folder, set this to the full path. Eg.

    “/folder-name1/folder-name2”.

    • To store call artifacts in the root of the bucket, leave this blank.

    @default “/”



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

Parameters:

  • json_object (String)

Returns:



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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


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

Returns:

  • (String)


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