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

// HashicorpCloudVault20201125AuditLogState State is the state of download.
//
//   - AUDIT_LOG_STATE_INVALID: AUDIT_LOG_STATE_INVALID 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_20201125.AuditLog.State
type HashicorpCloudVault20201125AuditLogState string

func NewHashicorpCloudVault20201125AuditLogState(value HashicorpCloudVault20201125AuditLogState) *HashicorpCloudVault20201125AuditLogState {
	return &value
}

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

const (

	// HashicorpCloudVault20201125AuditLogStateAUDITLOGSTATEINVALID captures enum value "AUDIT_LOG_STATE_INVALID"
	HashicorpCloudVault20201125AuditLogStateAUDITLOGSTATEINVALID HashicorpCloudVault20201125AuditLogState = "AUDIT_LOG_STATE_INVALID"

	// HashicorpCloudVault20201125AuditLogStatePENDING captures enum value "PENDING"
	HashicorpCloudVault20201125AuditLogStatePENDING HashicorpCloudVault20201125AuditLogState = "PENDING"

	// HashicorpCloudVault20201125AuditLogStateCREATING captures enum value "CREATING"
	HashicorpCloudVault20201125AuditLogStateCREATING HashicorpCloudVault20201125AuditLogState = "CREATING"

	// HashicorpCloudVault20201125AuditLogStateREADY captures enum value "READY"
	HashicorpCloudVault20201125AuditLogStateREADY HashicorpCloudVault20201125AuditLogState = "READY"

	// HashicorpCloudVault20201125AuditLogStateFAILED captures enum value "FAILED"
	HashicorpCloudVault20201125AuditLogStateFAILED HashicorpCloudVault20201125AuditLogState = "FAILED"

	// HashicorpCloudVault20201125AuditLogStateEXPIRED captures enum value "EXPIRED"
	HashicorpCloudVault20201125AuditLogStateEXPIRED HashicorpCloudVault20201125AuditLogState = "EXPIRED"
)

// for schema
var hashicorpCloudVault20201125AuditLogStateEnum []interface{}

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

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

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

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

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

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