# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Web module Models # # Class containting details about site recovery operation. # class CsmSiteRecoveryEntity include MsRestAzure # @return [DateTime] Point in time in which the site recover should be # attempted. attr_accessor :snapshot_time # @return [Boolean] If true, then the website's configuration will be # reverted to its state at SnapshotTime attr_accessor :recover_config # @return [String] [Optional] Destination web app name into which web # app should be recovered. This is case when new web app should be # created instead. attr_accessor :site_name # @return [String] [Optional] Destination web app slot name into which # web app should be recovered attr_accessor :slot_name # # Validate the object. Throws ValidationError if validation fails. # def validate # Nothing to validate end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.snapshot_time serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ') output_object['snapshotTime'] = serialized_property unless serialized_property.nil? serialized_property = object.recover_config output_object['recoverConfig'] = serialized_property unless serialized_property.nil? serialized_property = object.site_name output_object['siteName'] = serialized_property unless serialized_property.nil? serialized_property = object.slot_name output_object['slotName'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [CsmSiteRecoveryEntity] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = CsmSiteRecoveryEntity.new deserialized_property = object['snapshotTime'] deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty? output_object.snapshot_time = deserialized_property deserialized_property = object['recoverConfig'] output_object.recover_config = deserialized_property deserialized_property = object['siteName'] output_object.site_name = deserialized_property deserialized_property = object['slotName'] output_object.slot_name = deserialized_property output_object end end end end