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

// HashicorpCloudConsul20210204SnapshotSnapshotType SnapshotType represents the type of a snapshot.
//
//   - AUTOMATIC: AUTOMATIC is used for snapshots generated automatically, like a snapshot before update.
//   - MANUAL: MANUAL is used for snapshots that are initiated by a user's actions.
//   - SCHEDULED: SCHEDULED is used for snapshots that are generated based on a schedule.
//
// swagger:model hashicorp.cloud.consul_20210204.Snapshot.SnapshotType
type HashicorpCloudConsul20210204SnapshotSnapshotType string

func NewHashicorpCloudConsul20210204SnapshotSnapshotType(value HashicorpCloudConsul20210204SnapshotSnapshotType) *HashicorpCloudConsul20210204SnapshotSnapshotType {
	return &value
}

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

const (

	// HashicorpCloudConsul20210204SnapshotSnapshotTypeTYPEUNSET captures enum value "TYPE_UNSET"
	HashicorpCloudConsul20210204SnapshotSnapshotTypeTYPEUNSET HashicorpCloudConsul20210204SnapshotSnapshotType = "TYPE_UNSET"

	// HashicorpCloudConsul20210204SnapshotSnapshotTypeAUTOMATIC captures enum value "AUTOMATIC"
	HashicorpCloudConsul20210204SnapshotSnapshotTypeAUTOMATIC HashicorpCloudConsul20210204SnapshotSnapshotType = "AUTOMATIC"

	// HashicorpCloudConsul20210204SnapshotSnapshotTypeMANUAL captures enum value "MANUAL"
	HashicorpCloudConsul20210204SnapshotSnapshotTypeMANUAL HashicorpCloudConsul20210204SnapshotSnapshotType = "MANUAL"

	// HashicorpCloudConsul20210204SnapshotSnapshotTypeSCHEDULED captures enum value "SCHEDULED"
	HashicorpCloudConsul20210204SnapshotSnapshotTypeSCHEDULED HashicorpCloudConsul20210204SnapshotSnapshotType = "SCHEDULED"
)

// for schema
var hashicorpCloudConsul20210204SnapshotSnapshotTypeEnum []interface{}

func init() {
	var res []HashicorpCloudConsul20210204SnapshotSnapshotType
	if err := json.Unmarshal([]byte(`["TYPE_UNSET","AUTOMATIC","MANUAL","SCHEDULED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudConsul20210204SnapshotSnapshotTypeEnum = append(hashicorpCloudConsul20210204SnapshotSnapshotTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud consul 20210204 snapshot snapshot type
func (m HashicorpCloudConsul20210204SnapshotSnapshotType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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