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

// HostRoleUpdateParams host role update params
//
// swagger:model host-role-update-params
type HostRoleUpdateParams string

func NewHostRoleUpdateParams(value HostRoleUpdateParams) *HostRoleUpdateParams {
	return &value
}

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

const (

	// HostRoleUpdateParamsAutoAssign captures enum value "auto-assign"
	HostRoleUpdateParamsAutoAssign HostRoleUpdateParams = "auto-assign"

	// HostRoleUpdateParamsMaster captures enum value "master"
	HostRoleUpdateParamsMaster HostRoleUpdateParams = "master"

	// HostRoleUpdateParamsArbiter captures enum value "arbiter"
	HostRoleUpdateParamsArbiter HostRoleUpdateParams = "arbiter"

	// HostRoleUpdateParamsWorker captures enum value "worker"
	HostRoleUpdateParamsWorker HostRoleUpdateParams = "worker"
)

// for schema
var hostRoleUpdateParamsEnum []interface{}

func init() {
	var res []HostRoleUpdateParams
	if err := json.Unmarshal([]byte(`["auto-assign","master","arbiter","worker"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hostRoleUpdateParamsEnum = append(hostRoleUpdateParamsEnum, v)
	}
}

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

// Validate validates this host role update params
func (m HostRoleUpdateParams) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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