# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Sqlvirtualmachine::Mgmt::V2017_03_01_preview
  module Models
    #
    # Set a patching window during which Windows and SQL patches will be
    # applied.
    #
    class AutoPatchingSettings

      include MsRestAzure

      # @return [Boolean] Enable or disable autopatching on SQL virtual
      # machine.
      attr_accessor :enable

      # @return [DayOfWeek] Day of week to apply the patch on. Possible values
      # include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
      # 'Saturday', 'Sunday'
      attr_accessor :day_of_week

      # @return [Integer] Hour of the day when patching is initiated. Local VM
      # time.
      attr_accessor :maintenance_window_starting_hour

      # @return [Integer] Duration of patching.
      attr_accessor :maintenance_window_duration


      #
      # Mapper for AutoPatchingSettings class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'AutoPatchingSettings',
          type: {
            name: 'Composite',
            class_name: 'AutoPatchingSettings',
            model_properties: {
              enable: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enable',
                type: {
                  name: 'Boolean'
                }
              },
              day_of_week: {
                client_side_validation: true,
                required: false,
                serialized_name: 'dayOfWeek',
                type: {
                  name: 'Enum',
                  module: 'DayOfWeek'
                }
              },
              maintenance_window_starting_hour: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maintenanceWindowStartingHour',
                type: {
                  name: 'Number'
                }
              },
              maintenance_window_duration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maintenanceWindowDuration',
                type: {
                  name: 'Number'
                }
              }
            }
          }
        }
      end
    end
  end
end
