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

// HashicorpCloudWaypointVariableType - STRING: Defaults to treat type as a string
//
// swagger:model hashicorp.cloud.waypoint.Variable.Type
type HashicorpCloudWaypointVariableType string

func NewHashicorpCloudWaypointVariableType(value HashicorpCloudWaypointVariableType) *HashicorpCloudWaypointVariableType {
	return &value
}

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

const (

	// HashicorpCloudWaypointVariableTypeSTRING captures enum value "STRING"
	HashicorpCloudWaypointVariableTypeSTRING HashicorpCloudWaypointVariableType = "STRING"

	// HashicorpCloudWaypointVariableTypeBOOL captures enum value "BOOL"
	HashicorpCloudWaypointVariableTypeBOOL HashicorpCloudWaypointVariableType = "BOOL"

	// HashicorpCloudWaypointVariableTypeINT captures enum value "INT"
	HashicorpCloudWaypointVariableTypeINT HashicorpCloudWaypointVariableType = "INT"
)

// for schema
var hashicorpCloudWaypointVariableTypeEnum []interface{}

func init() {
	var res []HashicorpCloudWaypointVariableType
	if err := json.Unmarshal([]byte(`["STRING","BOOL","INT"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudWaypointVariableTypeEnum = append(hashicorpCloudWaypointVariableTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud waypoint variable type
func (m HashicorpCloudWaypointVariableType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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