Class: Azure::ARM::Storage::Models::StorageAccountPropertiesCreateParameters

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#access_tierAccessTier

tier used for billing. Access tier cannot be changed more than once every 7 days (168 hours). Access tier cannot be set for StandardLRS, StandardGRS, StandardRAGRS, or PremiumLRS account types. Possible values include: ‘Hot’, ‘Cool’

Returns:

  • (AccessTier)

    Required for StandardBlob accounts. The access



31
32
33
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 31

def access_tier
  @access_tier
end

#custom_domainCustomDomain

Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.

Returns:

  • (CustomDomain)

    User domain assigned to the storage account.



19
20
21
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 19

def custom_domain
  @custom_domain
end

#encryptionEncryption

If left unspecified the account encryption settings will remain. The default setting is unencrypted.

Returns:

  • (Encryption)

    Provides the encryption settings on the account.



24
25
26
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 24

def encryption
  @encryption
end

Class Method Details

.deserialize_object(object) ⇒ StorageAccountPropertiesCreateParameters

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 73

def self.deserialize_object(object)
  return if object.nil?
  output_object = StorageAccountPropertiesCreateParameters.new

  deserialized_property = object['customDomain']
  unless deserialized_property.nil?
    deserialized_property = CustomDomain.deserialize_object(deserialized_property)
  end
  output_object.custom_domain = deserialized_property

  deserialized_property = object['encryption']
  unless deserialized_property.nil?
    deserialized_property = Encryption.deserialize_object(deserialized_property)
  end
  output_object.encryption = deserialized_property

  deserialized_property = object['accessTier']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = AccessTier.constants.any? { |e| AccessTier.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum AccessTier does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.access_tier = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 46

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.custom_domain
  unless serialized_property.nil?
    serialized_property = CustomDomain.serialize_object(serialized_property)
  end
  output_object['customDomain'] = serialized_property unless serialized_property.nil?

  serialized_property = object.encryption
  unless serialized_property.nil?
    serialized_property = Encryption.serialize_object(serialized_property)
  end
  output_object['encryption'] = serialized_property unless serialized_property.nil?

  serialized_property = object.access_tier
  output_object['accessTier'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



36
37
38
39
# File 'lib/azure_mgmt_storage/models/storage_account_properties_create_parameters.rb', line 36

def validate
  @custom_domain.validate unless @custom_domain.nil?
  @encryption.validate unless @encryption.nil?
end