Class: Azure::ARM::Storage::Models::StorageAccountKey
- Inherits:
-
Object
- Object
- Azure::ARM::Storage::Models::StorageAccountKey
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_storage/models/storage_account_key.rb
Overview
An access key for the storage account.
Instance Attribute Summary collapse
-
#key_name ⇒ String
Name of the key.
-
#permissions ⇒ KeyPermission
include: ‘READ’, ‘FULL’.
-
#value ⇒ String
Base 64 encoded value of the key.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ StorageAccountKey
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#key_name ⇒ String
Returns Name of the key.
16 17 18 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 16 def key_name @key_name end |
#permissions ⇒ KeyPermission
include: ‘READ’, ‘FULL’
23 24 25 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 23 def @permissions end |
#value ⇒ String
Returns Base 64 encoded value of the key.
19 20 21 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 19 def value @value end |
Class Method Details
.deserialize_object(object) ⇒ StorageAccountKey
Deserializes given Ruby Hash into Model object.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 57 def self.deserialize_object(object) return if object.nil? output_object = StorageAccountKey.new deserialized_property = object['keyName'] output_object.key_name = deserialized_property deserialized_property = object['value'] output_object.value = deserialized_property deserialized_property = object['permissions'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = KeyPermission.constants.any? { |e| KeyPermission.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum KeyPermission does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object. = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 36 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.key_name output_object['keyName'] = serialized_property unless serialized_property.nil? serialized_property = object.value output_object['value'] = serialized_property unless serialized_property.nil? serialized_property = object. output_object['permissions'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
28 29 |
# File 'lib/azure_mgmt_storage/models/storage_account_key.rb', line 28 def validate end |