# 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::BatchAI::Mgmt::V2018_03_01
  module Models
    #
    # Contains information about the execution of a job in the Azure Batch
    # service.
    #
    class JobPropertiesExecutionInfo

      include MsRestAzure

      # @return [DateTime] The time at which the job started running. 'Running'
      # corresponds to the running state. If the job has been restarted or
      # retried, this is the most recent time at which the job started running.
      # This property is present only for job that are in the running or
      # completed state.
      attr_accessor :start_time

      # @return [DateTime] The time at which the job completed. This property
      # is only returned if the job is in completed state.
      attr_accessor :end_time

      # @return [Integer] The exit code of the job. This property is only
      # returned if the job is in completed state.
      attr_accessor :exit_code

      # @return [Array<BatchAIError>] Contains details of various errors
      # encountered by the service during job execution.
      attr_accessor :errors


      #
      # Mapper for JobPropertiesExecutionInfo class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'JobProperties_executionInfo',
          type: {
            name: 'Composite',
            class_name: 'JobPropertiesExecutionInfo',
            model_properties: {
              start_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'startTime',
                type: {
                  name: 'DateTime'
                }
              },
              end_time: {
                client_side_validation: true,
                required: false,
                serialized_name: 'endTime',
                type: {
                  name: 'DateTime'
                }
              },
              exit_code: {
                client_side_validation: true,
                required: false,
                serialized_name: 'exitCode',
                type: {
                  name: 'Number'
                }
              },
              errors: {
                client_side_validation: true,
                required: false,
                serialized_name: 'errors',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'BatchAIErrorElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'BatchAIError'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
