# 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 # # Represents information needed for cloning operation # class CloningInfo include MsRestAzure # @return [String] Correlation Id of cloning operation. This id ties # multiple cloning operations # together to use the same snapshot attr_accessor :correlation_id # @return [Boolean] Overwrite destination web app attr_accessor :overwrite # @return [Boolean] If true, clone custom hostnames from source web app attr_accessor :clone_custom_host_names # @return [Boolean] Clone source control from source web app attr_accessor :clone_source_control # @return [String] ARM resource id of the source web app. Web app # resource id is of the form # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} # for production slots and # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} # for other slots attr_accessor :source_web_app_id # @return [String] Hosting environment attr_accessor :hosting_environment # @return [Hash{String => String}] Application settings overrides for # cloned web app. If specified these settings will override the # settings cloned # from source web app. If not specified, application # settings from source web app are retained. attr_accessor :app_settings_overrides # @return [Boolean] If specified configure load balancing for source and # clone site attr_accessor :configure_load_balancing # @return [String] ARM resource id of the traffic manager profile to use # if it exists. Traffic manager resource id is of the form # /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName} attr_accessor :traffic_manager_profile_id # @return [String] Name of traffic manager profile to create. This is # only needed if traffic manager profile does not already exist attr_accessor :traffic_manager_profile_name # # Validate the object. Throws ValidationError if validation fails. # def validate @app_settings_overrides.each{ |e| e.validate if e.respond_to?(:validate) } unless @app_settings_overrides.nil? 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.correlation_id output_object['correlationId'] = serialized_property unless serialized_property.nil? serialized_property = object.overwrite output_object['overwrite'] = serialized_property unless serialized_property.nil? serialized_property = object.clone_custom_host_names output_object['cloneCustomHostNames'] = serialized_property unless serialized_property.nil? serialized_property = object.clone_source_control output_object['cloneSourceControl'] = serialized_property unless serialized_property.nil? serialized_property = object.source_web_app_id output_object['sourceWebAppId'] = serialized_property unless serialized_property.nil? serialized_property = object.hosting_environment output_object['hostingEnvironment'] = serialized_property unless serialized_property.nil? serialized_property = object.app_settings_overrides output_object['appSettingsOverrides'] = serialized_property unless serialized_property.nil? serialized_property = object.configure_load_balancing output_object['configureLoadBalancing'] = serialized_property unless serialized_property.nil? serialized_property = object.traffic_manager_profile_id output_object['trafficManagerProfileId'] = serialized_property unless serialized_property.nil? serialized_property = object.traffic_manager_profile_name output_object['trafficManagerProfileName'] = 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 [CloningInfo] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = CloningInfo.new deserialized_property = object['correlationId'] output_object.correlation_id = deserialized_property deserialized_property = object['overwrite'] output_object.overwrite = deserialized_property deserialized_property = object['cloneCustomHostNames'] output_object.clone_custom_host_names = deserialized_property deserialized_property = object['cloneSourceControl'] output_object.clone_source_control = deserialized_property deserialized_property = object['sourceWebAppId'] output_object.source_web_app_id = deserialized_property deserialized_property = object['hostingEnvironment'] output_object.hosting_environment = deserialized_property deserialized_property = object['appSettingsOverrides'] output_object.app_settings_overrides = deserialized_property deserialized_property = object['configureLoadBalancing'] output_object.configure_load_balancing = deserialized_property deserialized_property = object['trafficManagerProfileId'] output_object.traffic_manager_profile_id = deserialized_property deserialized_property = object['trafficManagerProfileName'] output_object.traffic_manager_profile_name = deserialized_property output_object end end end end