Class: Svix::AzureBlobStorageConfigIn
- Inherits:
-
Object
- Object
- Svix::AzureBlobStorageConfigIn
- Defined in:
- lib/svix/models/azure_blob_storage_config_in.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_key ⇒ Object
Access key.
-
#account ⇒ Object
Returns the value of attribute account.
-
#container ⇒ Object
Returns the value of attribute container.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AzureBlobStorageConfigIn
constructor
A new instance of AzureBlobStorageConfigIn.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ AzureBlobStorageConfigIn
Returns a new instance of AzureBlobStorageConfigIn.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 17 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::AzureBlobStorageConfigIn` new method" ) end attributes.each do |k, v| unless ALL_FIELD.include?(k.to_s) fail(ArgumentError, "The field #{k} is not part of Svix::AzureBlobStorageConfigIn") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#access_key ⇒ Object
Access key.
Currently a required field, but marked as optional because we may add different authentication in the future.
12 13 14 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 12 def access_key @access_key end |
#account ⇒ Object
Returns the value of attribute account.
8 9 10 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 8 def account @account end |
#container ⇒ Object
Returns the value of attribute container.
7 8 9 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 7 def container @container end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 35 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["container"] = attributes["container"] attrs["account"] = attributes["account"] attrs["access_key"] = attributes["accessKey"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 44 def serialize out = Hash.new out["container"] = Svix::serialize_primitive(@container) if @container out["account"] = Svix::serialize_primitive(@account) if @account out["accessKey"] = Svix::serialize_primitive(@access_key) if @access_key out end |
#to_json ⇒ Object
Serializes the object to a json string
54 55 56 |
# File 'lib/svix/models/azure_blob_storage_config_in.rb', line 54 def to_json JSON.dump(serialize) end |