# 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::Scheduler::Mgmt::V2016_03_01
  module Models
    #
    # Model object.
    #
    #
    class JobStatus

      include MsRestAzure

      # @return [Integer] Gets the number of times this job has executed.
      attr_accessor :execution_count

      # @return [Integer] Gets the number of times this job has failed.
      attr_accessor :failure_count

      # @return [Integer] Gets the number of faulted occurrences (occurrences
      # that were retried and failed as many times as the retry policy states).
      attr_accessor :faulted_count

      # @return [DateTime] Gets the time the last occurrence executed in
      # ISO-8601 format.  Could be empty if job has not run yet.
      attr_accessor :last_execution_time

      # @return [DateTime] Gets the time of the next occurrence in ISO-8601
      # format. Could be empty if the job is completed.
      attr_accessor :next_execution_time


      #
      # Mapper for JobStatus class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'JobStatus',
          type: {
            name: 'Composite',
            class_name: 'JobStatus',
            model_properties: {
              execution_count: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'executionCount',
                type: {
                  name: 'Number'
                }
              },
              failure_count: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'failureCount',
                type: {
                  name: 'Number'
                }
              },
              faulted_count: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'faultedCount',
                type: {
                  name: 'Number'
                }
              },
              last_execution_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'lastExecutionTime',
                type: {
                  name: 'DateTime'
                }
              },
              next_execution_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'nextExecutionTime',
                type: {
                  name: 'DateTime'
                }
              }
            }
          }
        }
      end
    end
  end
end
