// 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 (
	"context"
	"encoding/json"

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

// HashicorpCloudWaypointJobStatus The various status we allow a job to be in.
//
//   - STATUS_UNSPECIFIED: default/zero value; we have no job status
//   - STATUS_UNKNOWN: we don't know the status of the job!
//   - STATUS_RUNNING: the job was marked as running
//   - STATUS_HALTED: the job was halted/failed to be launched
//   - STATUS_SUCCESS: the job was successful
//   - STATUS_ERRORED: the job ran, but errored out
//   - STATUS_QUEUED: the job is queued to run, used by agents
//
// swagger:model hashicorp.cloud.waypoint.Job.Status
type HashicorpCloudWaypointJobStatus string

func NewHashicorpCloudWaypointJobStatus(value HashicorpCloudWaypointJobStatus) *HashicorpCloudWaypointJobStatus {
	return &value
}

// Pointer returns a pointer to a freshly-allocated HashicorpCloudWaypointJobStatus.
func (m HashicorpCloudWaypointJobStatus) Pointer() *HashicorpCloudWaypointJobStatus {
	return &m
}

const (

	// HashicorpCloudWaypointJobStatusSTATUSUNSPECIFIED captures enum value "STATUS_UNSPECIFIED"
	HashicorpCloudWaypointJobStatusSTATUSUNSPECIFIED HashicorpCloudWaypointJobStatus = "STATUS_UNSPECIFIED"

	// HashicorpCloudWaypointJobStatusSTATUSUNKNOWN captures enum value "STATUS_UNKNOWN"
	HashicorpCloudWaypointJobStatusSTATUSUNKNOWN HashicorpCloudWaypointJobStatus = "STATUS_UNKNOWN"

	// HashicorpCloudWaypointJobStatusSTATUSRUNNING captures enum value "STATUS_RUNNING"
	HashicorpCloudWaypointJobStatusSTATUSRUNNING HashicorpCloudWaypointJobStatus = "STATUS_RUNNING"

	// HashicorpCloudWaypointJobStatusSTATUSHALTED captures enum value "STATUS_HALTED"
	HashicorpCloudWaypointJobStatusSTATUSHALTED HashicorpCloudWaypointJobStatus = "STATUS_HALTED"

	// HashicorpCloudWaypointJobStatusSTATUSSUCCESS captures enum value "STATUS_SUCCESS"
	HashicorpCloudWaypointJobStatusSTATUSSUCCESS HashicorpCloudWaypointJobStatus = "STATUS_SUCCESS"

	// HashicorpCloudWaypointJobStatusSTATUSERRORED captures enum value "STATUS_ERRORED"
	HashicorpCloudWaypointJobStatusSTATUSERRORED HashicorpCloudWaypointJobStatus = "STATUS_ERRORED"

	// HashicorpCloudWaypointJobStatusSTATUSQUEUED captures enum value "STATUS_QUEUED"
	HashicorpCloudWaypointJobStatusSTATUSQUEUED HashicorpCloudWaypointJobStatus = "STATUS_QUEUED"
)

// for schema
var hashicorpCloudWaypointJobStatusEnum []interface{}

func init() {
	var res []HashicorpCloudWaypointJobStatus
	if err := json.Unmarshal([]byte(`["STATUS_UNSPECIFIED","STATUS_UNKNOWN","STATUS_RUNNING","STATUS_HALTED","STATUS_SUCCESS","STATUS_ERRORED","STATUS_QUEUED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudWaypointJobStatusEnum = append(hashicorpCloudWaypointJobStatusEnum, v)
	}
}

func (m HashicorpCloudWaypointJobStatus) validateHashicorpCloudWaypointJobStatusEnum(path, location string, value HashicorpCloudWaypointJobStatus) error {
	if err := validate.EnumCase(path, location, value, hashicorpCloudWaypointJobStatusEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this hashicorp cloud waypoint job status
func (m HashicorpCloudWaypointJobStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud waypoint job status based on context it is used
func (m HashicorpCloudWaypointJobStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
