Class: Vapi::UpdateSupabaseCredentialDto
- Inherits:
-
Object
- Object
- Vapi::UpdateSupabaseCredentialDto
- Defined in:
- lib/vapi_server_sdk/types/update_supabase_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.
- #bucket_plan ⇒ Vapi::SupabaseBucketPlan readonly
-
#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.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::UpdateSupabaseCredentialDto
Deserialize a JSON object to an instance of UpdateSupabaseCredentialDto.
-
.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(fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) ⇒ Vapi::UpdateSupabaseCredentialDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of UpdateSupabaseCredentialDto to a JSON object.
Constructor Details
#initialize(fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) ⇒ Vapi::UpdateSupabaseCredentialDto
30 31 32 33 34 35 36 37 38 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 30 def initialize(fallback_index: OMIT, name: OMIT, bucket_plan: OMIT, additional_properties: nil) @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 = { "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.
17 18 19 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 17 def additional_properties @additional_properties end |
#bucket_plan ⇒ Vapi::SupabaseBucketPlan (readonly)
15 16 17 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 15 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.
11 12 13 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 11 def fallback_index @fallback_index end |
#name ⇒ String (readonly)
Returns This is the name of credential. This is just for your reference.
13 14 15 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 13 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::UpdateSupabaseCredentialDto
Deserialize a JSON object to an instance of UpdateSupabaseCredentialDto
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 44 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) 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::SupabaseBucketPlan.from_json(json_object: bucket_plan) end new( 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.
76 77 78 79 80 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 76 def self.validate_raw(obj:) 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::SupabaseBucketPlan.validate_raw(obj: obj.bucket_plan) end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of UpdateSupabaseCredentialDto to a JSON object
66 67 68 |
# File 'lib/vapi_server_sdk/types/update_supabase_credential_dto.rb', line 66 def to_json(*_args) @_field_set&.to_json end |