# 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::SQL::Mgmt::V2017_03_01_preview
  module Models
    #
    # Scheduling properties of a job.
    #
    class JobSchedule

      include MsRestAzure

      # @return [DateTime] Schedule start time. Default value:
      # Date.parse('0001-01-01T00:00:00Z') .
      attr_accessor :start_time

      # @return [DateTime] Schedule end time. Default value:
      # Date.parse('9999-12-31T11:59:59Z') .
      attr_accessor :end_time

      # @return [JobScheduleType] Schedule interval type. Possible values
      # include: 'Once', 'Recurring'. Default value: 'Once' .
      attr_accessor :type

      # @return [Boolean] Whether or not the schedule is enabled.
      attr_accessor :enabled

      # @return [String] Value of the schedule's recurring interval, if the
      # schedule type is recurring. ISO8601 duration format.
      attr_accessor :interval


      #
      # Mapper for JobSchedule class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'JobSchedule',
          type: {
            name: 'Composite',
            class_name: 'JobSchedule',
            model_properties: {
              start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'startTime',
                default_value: Date.parse('0001-01-01T00:00:00Z'),
                type: {
                  name: 'DateTime'
                }
              },
              end_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'endTime',
                default_value: Date.parse('9999-12-31T11:59:59Z'),
                type: {
                  name: 'DateTime'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'type',
                default_value: 'Once',
                type: {
                  name: 'Enum',
                  module: 'JobScheduleType'
                }
              },
              enabled: {
                client_side_validation: true,
                required: false,
                serialized_name: 'enabled',
                type: {
                  name: 'Boolean'
                }
              },
              interval: {
                client_side_validation: true,
                required: false,
                serialized_name: 'interval',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
