// 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"
)

// HostStage host stage
//
// swagger:model host-stage
type HostStage string

func NewHostStage(value HostStage) *HostStage {
	return &value
}

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

const (

	// HostStageStartingInstallation captures enum value "Starting installation"
	HostStageStartingInstallation HostStage = "Starting installation"

	// HostStageWaitingForControlPlane captures enum value "Waiting for control plane"
	HostStageWaitingForControlPlane HostStage = "Waiting for control plane"

	// HostStageWaitingForBootkube captures enum value "Waiting for bootkube"
	HostStageWaitingForBootkube HostStage = "Waiting for bootkube"

	// HostStageWaitingForController captures enum value "Waiting for controller"
	HostStageWaitingForController HostStage = "Waiting for controller"

	// HostStageInstalling captures enum value "Installing"
	HostStageInstalling HostStage = "Installing"

	// HostStageWritingImageToDisk captures enum value "Writing image to disk"
	HostStageWritingImageToDisk HostStage = "Writing image to disk"

	// HostStageCopyingRegistryDataToDisk captures enum value "Copying registry data to disk"
	HostStageCopyingRegistryDataToDisk HostStage = "Copying registry data to disk"

	// HostStageRebooting captures enum value "Rebooting"
	HostStageRebooting HostStage = "Rebooting"

	// HostStageWaitingForIgnition captures enum value "Waiting for ignition"
	HostStageWaitingForIgnition HostStage = "Waiting for ignition"

	// HostStageConfiguring captures enum value "Configuring"
	HostStageConfiguring HostStage = "Configuring"

	// HostStageJoined captures enum value "Joined"
	HostStageJoined HostStage = "Joined"

	// HostStageDone captures enum value "Done"
	HostStageDone HostStage = "Done"

	// HostStageFailed captures enum value "Failed"
	HostStageFailed HostStage = "Failed"
)

// for schema
var hostStageEnum []interface{}

func init() {
	var res []HostStage
	if err := json.Unmarshal([]byte(`["Starting installation","Waiting for control plane","Waiting for bootkube","Waiting for controller","Installing","Writing image to disk","Copying registry data to disk","Rebooting","Waiting for ignition","Configuring","Joined","Done","Failed"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hostStageEnum = append(hostStageEnum, v)
	}
}

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

// Validate validates this host stage
func (m HostStage) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this host stage based on context it is used
func (m HostStage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
