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

package models

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

import (
	"encoding/json"

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

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

// GetCharactersCharacterIDIndustryJobsOKBodyItems get_characters_character_id_industry_jobs_200_ok
//
// 200 ok object
// swagger:model getCharactersCharacterIdIndustryJobsOKBodyItems

type GetCharactersCharacterIDIndustryJobsOKBodyItems struct {

	// get_characters_character_id_industry_jobs_activity_id
	//
	// Job activity ID
	// Required: true
	ActivityID *int32 `json:"activity_id"`

	// get_characters_character_id_industry_jobs_blueprint_id
	//
	// blueprint_id integer
	// Required: true
	BlueprintID *int64 `json:"blueprint_id"`

	// get_characters_character_id_industry_jobs_blueprint_location_id
	//
	// Location ID of the location from which the blueprint was installed. Normally a station ID, but can also be an asset (e.g. container) or corporation facility
	// Required: true
	BlueprintLocationID *int64 `json:"blueprint_location_id"`

	// get_characters_character_id_industry_jobs_blueprint_type_id
	//
	// blueprint_type_id integer
	// Required: true
	BlueprintTypeID *int32 `json:"blueprint_type_id"`

	// get_characters_character_id_industry_jobs_completed_character_id
	//
	// ID of the character which completed this job
	CompletedCharacterID int32 `json:"completed_character_id,omitempty"`

	// get_characters_character_id_industry_jobs_completed_date
	//
	// Date and time when this job was completed
	CompletedDate strfmt.DateTime `json:"completed_date,omitempty"`

	// get_characters_character_id_industry_jobs_cost
	//
	// The sume of job installation fee and industry facility tax
	Cost float32 `json:"cost,omitempty"`

	// get_characters_character_id_industry_jobs_duration
	//
	// Job duration in seconds
	// Required: true
	Duration *int32 `json:"duration"`

	// get_characters_character_id_industry_jobs_end_date
	//
	// Date and time when this job finished
	// Required: true
	EndDate *strfmt.DateTime `json:"end_date"`

	// get_characters_character_id_industry_jobs_facility_id
	//
	// ID of the facility where this job is running
	// Required: true
	FacilityID *int64 `json:"facility_id"`

	// get_characters_character_id_industry_jobs_installer_id
	//
	// ID of the character which installed this job
	// Required: true
	InstallerID *int32 `json:"installer_id"`

	// get_characters_character_id_industry_jobs_job_id
	//
	// Unique job ID
	// Required: true
	JobID *int32 `json:"job_id"`

	// get_characters_character_id_industry_jobs_licensed_runs
	//
	// Number of runs blueprint is licensed for
	LicensedRuns int32 `json:"licensed_runs,omitempty"`

	// get_characters_character_id_industry_jobs_output_location_id
	//
	// Location ID of the location to which the output of the job will be delivered. Normally a station ID, but can also be a corporation facility
	// Required: true
	OutputLocationID *int64 `json:"output_location_id"`

	// get_characters_character_id_industry_jobs_pause_date
	//
	// Date and time when this job was paused (i.e. time when the facility where this job was installed went offline)
	PauseDate strfmt.DateTime `json:"pause_date,omitempty"`

	// get_characters_character_id_industry_jobs_probability
	//
	// Chance of success for invention
	Probability float32 `json:"probability,omitempty"`

	// get_characters_character_id_industry_jobs_product_type_id
	//
	// Type ID of product (manufactured, copied or invented)
	ProductTypeID int32 `json:"product_type_id,omitempty"`

	// get_characters_character_id_industry_jobs_runs
	//
	// Number of runs for a manufacturing job, or number of copies to make for a blueprint copy
	// Required: true
	Runs *int32 `json:"runs"`

	// get_characters_character_id_industry_jobs_start_date
	//
	// Date and time when this job started
	// Required: true
	StartDate *strfmt.DateTime `json:"start_date"`

	// get_characters_character_id_industry_jobs_station_id
	//
	// ID of the station where industry facility is located
	// Required: true
	StationID *int64 `json:"station_id"`

	// get_characters_character_id_industry_jobs_status
	//
	// status string
	// Required: true
	Status *string `json:"status"`

	// get_characters_character_id_industry_jobs_successful_runs
	//
	// Number of successful runs for this job. Equal to runs unless this is an invention job
	SuccessfulRuns int32 `json:"successful_runs,omitempty"`
}

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems activity_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems blueprint_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems blueprint_location_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems blueprint_type_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems completed_character_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems completed_date false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems cost false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems duration false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems end_date false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems facility_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems installer_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems job_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems licensed_runs false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems output_location_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems pause_date false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems probability false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems product_type_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems runs false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems start_date false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems station_id false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems status false */

/* polymorph getCharactersCharacterIdIndustryJobsOKBodyItems successful_runs false */

// Validate validates this get characters character Id industry jobs o k body items
func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateActivityID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateBlueprintID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateBlueprintLocationID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateBlueprintTypeID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateDuration(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateEndDate(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateFacilityID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateInstallerID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateJobID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateOutputLocationID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateRuns(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateStartDate(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateStationID(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateStatus(formats); err != nil {
		// prop
		res = append(res, err)
	}

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

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateActivityID(formats strfmt.Registry) error {

	if err := validate.Required("activity_id", "body", m.ActivityID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateBlueprintID(formats strfmt.Registry) error {

	if err := validate.Required("blueprint_id", "body", m.BlueprintID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateBlueprintLocationID(formats strfmt.Registry) error {

	if err := validate.Required("blueprint_location_id", "body", m.BlueprintLocationID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateBlueprintTypeID(formats strfmt.Registry) error {

	if err := validate.Required("blueprint_type_id", "body", m.BlueprintTypeID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateDuration(formats strfmt.Registry) error {

	if err := validate.Required("duration", "body", m.Duration); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateEndDate(formats strfmt.Registry) error {

	if err := validate.Required("end_date", "body", m.EndDate); err != nil {
		return err
	}

	if err := validate.FormatOf("end_date", "body", "date-time", m.EndDate.String(), formats); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateFacilityID(formats strfmt.Registry) error {

	if err := validate.Required("facility_id", "body", m.FacilityID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateInstallerID(formats strfmt.Registry) error {

	if err := validate.Required("installer_id", "body", m.InstallerID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateJobID(formats strfmt.Registry) error {

	if err := validate.Required("job_id", "body", m.JobID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateOutputLocationID(formats strfmt.Registry) error {

	if err := validate.Required("output_location_id", "body", m.OutputLocationID); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateRuns(formats strfmt.Registry) error {

	if err := validate.Required("runs", "body", m.Runs); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateStartDate(formats strfmt.Registry) error {

	if err := validate.Required("start_date", "body", m.StartDate); err != nil {
		return err
	}

	if err := validate.FormatOf("start_date", "body", "date-time", m.StartDate.String(), formats); err != nil {
		return err
	}

	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateStationID(formats strfmt.Registry) error {

	if err := validate.Required("station_id", "body", m.StationID); err != nil {
		return err
	}

	return nil
}

var getCharactersCharacterIdIndustryJobsOKBodyItemsTypeStatusPropEnum []interface{}

func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["active","paused","ready","delivered","cancelled","reverted"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCharactersCharacterIdIndustryJobsOKBodyItemsTypeStatusPropEnum = append(getCharactersCharacterIdIndustryJobsOKBodyItemsTypeStatusPropEnum, v)
	}
}

const (
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusActive captures enum value "active"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusActive string = "active"
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusPaused captures enum value "paused"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusPaused string = "paused"
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusReady captures enum value "ready"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusReady string = "ready"
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusDelivered captures enum value "delivered"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusDelivered string = "delivered"
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusCancelled captures enum value "cancelled"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusCancelled string = "cancelled"
	// GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusReverted captures enum value "reverted"
	GetCharactersCharacterIDIndustryJobsOKBodyItemsStatusReverted string = "reverted"
)

// prop value enum
func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateStatusEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCharactersCharacterIdIndustryJobsOKBodyItemsTypeStatusPropEnum); err != nil {
		return err
	}
	return nil
}

func (m *GetCharactersCharacterIDIndustryJobsOKBodyItems) validateStatus(formats strfmt.Registry) error {

	if err := validate.Required("status", "body", m.Status); err != nil {
		return err
	}

	// value enum
	if err := m.validateStatusEnum("status", "body", *m.Status); err != nil {
		return err
	}

	return nil
}

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

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