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

// HashicorpCloudIamServicePrincipalKeyState State is the state of the key.
//
//   - UNSET: UNSET is the default value.
//
// Should never be used at runtime for valid messages.
//   - CREATING: CREATING is a key that's just been inserted in the DB, and its
//
// authN credentials are still being prepared. Will transition to
// ACTIVE on success.
//   - ACTIVE: ACTIVE is a key that's been properly created and is ready to use.
//   - DELETING: DELETING is a key that it's being deleted. It will be fully deleted
//
// once its authN credentials will have been deleted from Auth0.
//
// swagger:model hashicorp.cloud.iam.ServicePrincipal.Key.State
type HashicorpCloudIamServicePrincipalKeyState string

func NewHashicorpCloudIamServicePrincipalKeyState(value HashicorpCloudIamServicePrincipalKeyState) *HashicorpCloudIamServicePrincipalKeyState {
	return &value
}

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

const (

	// HashicorpCloudIamServicePrincipalKeyStateUNSET captures enum value "UNSET"
	HashicorpCloudIamServicePrincipalKeyStateUNSET HashicorpCloudIamServicePrincipalKeyState = "UNSET"

	// HashicorpCloudIamServicePrincipalKeyStateCREATING captures enum value "CREATING"
	HashicorpCloudIamServicePrincipalKeyStateCREATING HashicorpCloudIamServicePrincipalKeyState = "CREATING"

	// HashicorpCloudIamServicePrincipalKeyStateACTIVE captures enum value "ACTIVE"
	HashicorpCloudIamServicePrincipalKeyStateACTIVE HashicorpCloudIamServicePrincipalKeyState = "ACTIVE"

	// HashicorpCloudIamServicePrincipalKeyStateDELETING captures enum value "DELETING"
	HashicorpCloudIamServicePrincipalKeyStateDELETING HashicorpCloudIamServicePrincipalKeyState = "DELETING"
)

// for schema
var hashicorpCloudIamServicePrincipalKeyStateEnum []interface{}

func init() {
	var res []HashicorpCloudIamServicePrincipalKeyState
	if err := json.Unmarshal([]byte(`["UNSET","CREATING","ACTIVE","DELETING"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudIamServicePrincipalKeyStateEnum = append(hashicorpCloudIamServicePrincipalKeyStateEnum, v)
	}
}

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

// Validate validates this hashicorp cloud iam service principal key state
func (m HashicorpCloudIamServicePrincipalKeyState) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud iam service principal key state based on context it is used
func (m HashicorpCloudIamServicePrincipalKeyState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
