Class: Azure::ARM::Web::Models::BackupRequestProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::BackupRequestProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/backup_request_properties.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#backup_schedule ⇒ BackupSchedule
periodically.
-
#databases ⇒ Array<DatabaseBackupSetting>
Databases included in the backup.
-
#enabled ⇒ Boolean
included in that case), false if the backup schedule should be disabled.
-
#name ⇒ String
Name of the backup.
-
#storage_account_url ⇒ String
SAS URL to the container.
-
#type ⇒ BackupRestoreOperationType
values include: ‘Default’, ‘Clone’, ‘Relocation’.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ BackupRequestProperties
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
#backup_schedule ⇒ BackupSchedule
periodically
28 29 30 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 28 def backup_schedule @backup_schedule end |
#databases ⇒ Array<DatabaseBackupSetting>
Returns Databases included in the backup.
31 32 33 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 31 def databases @databases end |
#enabled ⇒ Boolean
included in that case), false if the backup schedule should be disabled
21 22 23 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 21 def enabled @enabled end |
#name ⇒ String
Returns Name of the backup.
16 17 18 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 16 def name @name end |
#storage_account_url ⇒ String
Returns SAS URL to the container.
24 25 26 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 24 def storage_account_url @storage_account_url end |
#type ⇒ BackupRestoreOperationType
values include: ‘Default’, ‘Clone’, ‘Relocation’
35 36 37 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 35 def type @type end |
Class Method Details
.deserialize_object(object) ⇒ BackupRequestProperties
Deserializes given Ruby Hash into Model object.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 93 def self.deserialize_object(object) return if object.nil? output_object = BackupRequestProperties.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['enabled'] output_object.enabled = deserialized_property deserialized_property = object['storageAccountUrl'] output_object.storage_account_url = deserialized_property deserialized_property = object['backupSchedule'] unless deserialized_property.nil? deserialized_property = BackupSchedule.deserialize_object(deserialized_property) end output_object.backup_schedule = deserialized_property deserialized_property = object['databases'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element1| unless element1.nil? element1 = DatabaseBackupSetting.deserialize_object(element1) end deserialized_array.push(element1) end deserialized_property = deserialized_array end output_object.databases = deserialized_property deserialized_property = object['type'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = BackupRestoreOperationType.constants.any? { |e| BackupRestoreOperationType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum BackupRestoreOperationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.type = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 50 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.enabled output_object['enabled'] = serialized_property unless serialized_property.nil? serialized_property = object.storage_account_url output_object['storageAccountUrl'] = serialized_property unless serialized_property.nil? serialized_property = object.backup_schedule unless serialized_property.nil? serialized_property = BackupSchedule.serialize_object(serialized_property) end output_object['backupSchedule'] = serialized_property unless serialized_property.nil? serialized_property = object.databases unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = DatabaseBackupSetting.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['databases'] = serialized_property unless serialized_property.nil? serialized_property = object.type output_object['type'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
40 41 42 43 |
# File 'lib/azure_mgmt_web/models/backup_request_properties.rb', line 40 def validate @backup_schedule.validate unless @backup_schedule.nil? @databases.each{ |e| e.validate if e.respond_to?(:validate) } unless @databases.nil? end |