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

// HashicorpCloudVault20200420AuditLogState State is the state of download.
//
//   - UNSET: UNSET is a sentinel zero value so that an uninitialized value can be
//
// detected.
//   - PENDING: PENDING is the initial state before the workflow starts.
//   - CREATING: CREATING is the state used when the download is being prepared.
//   - READY: READY is the completed state when the download is ready
//   - FAILED: FAILED is a failure state in which the download is not created
//   - EXPIRED: EXPIRED is the state that the download hits when it is no longer
//
// accessible for download
//
// swagger:model hashicorp.cloud.vault_20200420.AuditLog.State
type HashicorpCloudVault20200420AuditLogState string

func NewHashicorpCloudVault20200420AuditLogState(value HashicorpCloudVault20200420AuditLogState) *HashicorpCloudVault20200420AuditLogState {
	return &value
}

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

const (

	// HashicorpCloudVault20200420AuditLogStateUNSET captures enum value "UNSET"
	HashicorpCloudVault20200420AuditLogStateUNSET HashicorpCloudVault20200420AuditLogState = "UNSET"

	// HashicorpCloudVault20200420AuditLogStatePENDING captures enum value "PENDING"
	HashicorpCloudVault20200420AuditLogStatePENDING HashicorpCloudVault20200420AuditLogState = "PENDING"

	// HashicorpCloudVault20200420AuditLogStateCREATING captures enum value "CREATING"
	HashicorpCloudVault20200420AuditLogStateCREATING HashicorpCloudVault20200420AuditLogState = "CREATING"

	// HashicorpCloudVault20200420AuditLogStateREADY captures enum value "READY"
	HashicorpCloudVault20200420AuditLogStateREADY HashicorpCloudVault20200420AuditLogState = "READY"

	// HashicorpCloudVault20200420AuditLogStateFAILED captures enum value "FAILED"
	HashicorpCloudVault20200420AuditLogStateFAILED HashicorpCloudVault20200420AuditLogState = "FAILED"

	// HashicorpCloudVault20200420AuditLogStateEXPIRED captures enum value "EXPIRED"
	HashicorpCloudVault20200420AuditLogStateEXPIRED HashicorpCloudVault20200420AuditLogState = "EXPIRED"
)

// for schema
var hashicorpCloudVault20200420AuditLogStateEnum []interface{}

func init() {
	var res []HashicorpCloudVault20200420AuditLogState
	if err := json.Unmarshal([]byte(`["UNSET","PENDING","CREATING","READY","FAILED","EXPIRED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudVault20200420AuditLogStateEnum = append(hashicorpCloudVault20200420AuditLogStateEnum, v)
	}
}

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

// Validate validates this hashicorp cloud vault 20200420 audit log state
func (m HashicorpCloudVault20200420AuditLogState) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud vault 20200420 audit log state based on context it is used
func (m HashicorpCloudVault20200420AuditLogState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
