Class: Azure::ARM::Web::Models::RestoreRequestProperties
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::RestoreRequestProperties
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/restore_request_properties.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#adjust_connection_strings ⇒ Boolean
SiteConfig.ConnectionStrings should be set in new site.
-
#blob_name ⇒ String
Name of a blob which contains the backup.
-
#databases ⇒ Array<DatabaseBackupSetting>
should be restored.
-
#hosting_environment ⇒ String
restoring a site to an App Service Environment).
-
#ignore_conflicting_host_names ⇒ Boolean
domains.
-
#operation_type ⇒ BackupRestoreOperationType
include: ‘Default’, ‘Clone’, ‘Relocation’.
-
#overwrite ⇒ Boolean
site.
-
#site_name ⇒ String
Name of a site (Web App).
-
#storage_account_url ⇒ String
SAS URL to the container.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ RestoreRequestProperties
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
#adjust_connection_strings ⇒ Boolean
SiteConfig.ConnectionStrings should be set in new site
46 47 48 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 46 def adjust_connection_strings @adjust_connection_strings end |
#blob_name ⇒ String
Returns Name of a blob which contains the backup.
19 20 21 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 19 def blob_name @blob_name end |
#databases ⇒ Array<DatabaseBackupSetting>
should be restored. This list has to match the list of databases included in the backup.
31 32 33 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 31 def databases @databases end |
#hosting_environment ⇒ String
restoring a site to an App Service Environment)
50 51 52 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 50 def hosting_environment @hosting_environment end |
#ignore_conflicting_host_names ⇒ Boolean
domains. If “true”, custom domains are removed automatically. If “false”, custom domains are added to the site object when it is being restored, but that might fail due to conflicts during the operation.
38 39 40 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 38 def ignore_conflicting_host_names @ignore_conflicting_host_names end |
#operation_type ⇒ BackupRestoreOperationType
include: ‘Default’, ‘Clone’, ‘Relocation’
42 43 44 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 42 def operation_type @operation_type end |
#overwrite ⇒ Boolean
site. “True” needed if trying to restore over an existing site.
23 24 25 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 23 def overwrite @overwrite end |
#site_name ⇒ String
Returns Name of a site (Web App).
26 27 28 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 26 def site_name @site_name end |
#storage_account_url ⇒ String
Returns SAS URL to the container.
16 17 18 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 16 def storage_account_url @storage_account_url end |
Class Method Details
.deserialize_object(object) ⇒ RestoreRequestProperties
Deserializes given Ruby Hash into Model object.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 113 def self.deserialize_object(object) return if object.nil? output_object = RestoreRequestProperties.new deserialized_property = object['storageAccountUrl'] output_object.storage_account_url = deserialized_property deserialized_property = object['blobName'] output_object.blob_name = deserialized_property deserialized_property = object['overwrite'] output_object.overwrite = deserialized_property deserialized_property = object['siteName'] output_object.site_name = 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['ignoreConflictingHostNames'] output_object.ignore_conflicting_host_names = deserialized_property deserialized_property = object['operationType'] 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.operation_type = deserialized_property deserialized_property = object['adjustConnectionStrings'] output_object.adjust_connection_strings = deserialized_property deserialized_property = object['hostingEnvironment'] output_object.hosting_environment = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
64 65 66 67 68 69 70 71 72 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 98 99 100 101 102 103 104 105 106 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 64 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.storage_account_url output_object['storageAccountUrl'] = serialized_property unless serialized_property.nil? serialized_property = object.blob_name output_object['blobName'] = serialized_property unless serialized_property.nil? serialized_property = object.overwrite output_object['overwrite'] = serialized_property unless serialized_property.nil? serialized_property = object.site_name output_object['siteName'] = 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.ignore_conflicting_host_names output_object['ignoreConflictingHostNames'] = serialized_property unless serialized_property.nil? serialized_property = object.operation_type output_object['operationType'] = serialized_property unless serialized_property.nil? serialized_property = object.adjust_connection_strings output_object['adjustConnectionStrings'] = serialized_property unless serialized_property.nil? serialized_property = object.hosting_environment output_object['hostingEnvironment'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
55 56 57 |
# File 'lib/azure_mgmt_web/models/restore_request_properties.rb', line 55 def validate @databases.each{ |e| e.validate if e.respond_to?(:validate) } unless @databases.nil? end |