# 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::CognitiveServices::Face::V1_0
  module Models
    #
    # Training status object.
    #
    class TrainingStatus

      include MsRestAzure

      # @return [TrainingStatusType] Training status: notstarted, running,
      # succeeded, failed. If the training process is waiting to perform, the
      # status is notstarted. If the training is ongoing, the status is
      # running. Status succeed means this person group or large person group
      # is ready for Face - Identify, or this large face list is ready for Face
      # - Find Similar. Status failed is often caused by no person or no
      # persisted face exist in the person group or large person group, or no
      # persisted face exist in the large face list. Possible values include:
      # 'nonstarted', 'running', 'succeeded', 'failed'
      attr_accessor :status

      # @return [DateTime] A combined UTC date and time string that describes
      # the created time of the person group, large person group or large face
      # list.
      attr_accessor :created

      # @return [DateTime] A combined UTC date and time string that describes
      # the last modify time of the person group, large person group or large
      # face list, could be null value when the group is not successfully
      # trained.
      attr_accessor :last_action

      # @return [DateTime] A combined UTC date and time string that describes
      # the last successful training time of the person group, large person
      # group or large face list.
      attr_accessor :last_successful_training

      # @return [String] Show failure message when training failed (omitted
      # when training succeed).
      attr_accessor :message


      #
      # Mapper for TrainingStatus class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TrainingStatus',
          type: {
            name: 'Composite',
            class_name: 'TrainingStatus',
            model_properties: {
              status: {
                client_side_validation: true,
                required: true,
                serialized_name: 'status',
                type: {
                  name: 'Enum',
                  module: 'TrainingStatusType'
                }
              },
              created: {
                client_side_validation: true,
                required: true,
                serialized_name: 'createdDateTime',
                type: {
                  name: 'DateTime'
                }
              },
              last_action: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastActionDateTime',
                type: {
                  name: 'DateTime'
                }
              },
              last_successful_training: {
                client_side_validation: true,
                required: false,
                serialized_name: 'lastSuccessfulTrainingDateTime',
                type: {
                  name: 'DateTime'
                }
              },
              message: {
                client_side_validation: true,
                required: false,
                serialized_name: 'message',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
