// Code generated by go-swagger; DO NOT EDIT.

package restmodels

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	strfmt "github.com/go-openapi/strfmt"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
)

// TrainingStatus training status
// swagger:model TrainingStatus

type TrainingStatus struct {

	// Training completion timestamp (Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
	//
	Completed string `json:"completed,omitempty"`

	// A code identifying the cause of a status message.
	ErrorCode string `json:"error_code,omitempty"`

	// Status of the training.
	Status string `json:"status,omitempty"`

	// Description of the training status.
	StatusDescription string `json:"status_description,omitempty"`

	// A human readable message description of the training status.
	StatusMessage string `json:"status_message,omitempty"`

	// Training submission timestamp (Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
	//
	Submitted string `json:"submitted,omitempty"`
}

/* polymorph TrainingStatus completed false */

/* polymorph TrainingStatus error_code false */

/* polymorph TrainingStatus status false */

/* polymorph TrainingStatus status_description false */

/* polymorph TrainingStatus status_message false */

/* polymorph TrainingStatus submitted false */

// Validate validates this training status
func (m *TrainingStatus) Validate(formats strfmt.Registry) error {
	var res []error

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// MarshalBinary interface implementation
func (m *TrainingStatus) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *TrainingStatus) UnmarshalBinary(b []byte) error {
	var res TrainingStatus
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
