// Code generated by go-swagger; DO NOT EDIT.

package experiment_model

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

// APIExperimentStorageState api experiment storage state
//
// swagger:model apiExperimentStorageState
type APIExperimentStorageState string

func NewAPIExperimentStorageState(value APIExperimentStorageState) *APIExperimentStorageState {
	return &value
}

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

const (

	// APIExperimentStorageStateSTORAGESTATEUNSPECIFIED captures enum value "STORAGESTATE_UNSPECIFIED"
	APIExperimentStorageStateSTORAGESTATEUNSPECIFIED APIExperimentStorageState = "STORAGESTATE_UNSPECIFIED"

	// APIExperimentStorageStateSTORAGESTATEAVAILABLE captures enum value "STORAGESTATE_AVAILABLE"
	APIExperimentStorageStateSTORAGESTATEAVAILABLE APIExperimentStorageState = "STORAGESTATE_AVAILABLE"

	// APIExperimentStorageStateSTORAGESTATEARCHIVED captures enum value "STORAGESTATE_ARCHIVED"
	APIExperimentStorageStateSTORAGESTATEARCHIVED APIExperimentStorageState = "STORAGESTATE_ARCHIVED"
)

// for schema
var apiExperimentStorageStateEnum []interface{}

func init() {
	var res []APIExperimentStorageState
	if err := json.Unmarshal([]byte(`["STORAGESTATE_UNSPECIFIED","STORAGESTATE_AVAILABLE","STORAGESTATE_ARCHIVED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiExperimentStorageStateEnum = append(apiExperimentStorageStateEnum, v)
	}
}

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

// Validate validates this api experiment storage state
func (m APIExperimentStorageState) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this api experiment storage state based on context it is used
func (m APIExperimentStorageState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
