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

// CommonRegParamsRevision common reg params revision
//
// swagger:model commonRegParamsRevision
type CommonRegParamsRevision string

func NewCommonRegParamsRevision(value CommonRegParamsRevision) *CommonRegParamsRevision {
	return &value
}

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

const (

	// CommonRegParamsRevisionA captures enum value "A"
	CommonRegParamsRevisionA CommonRegParamsRevision = "A"

	// CommonRegParamsRevisionB captures enum value "B"
	CommonRegParamsRevisionB CommonRegParamsRevision = "B"

	// CommonRegParamsRevisionRP002100 captures enum value "RP002_1_0_0"
	CommonRegParamsRevisionRP002100 CommonRegParamsRevision = "RP002_1_0_0"

	// CommonRegParamsRevisionRP002101 captures enum value "RP002_1_0_1"
	CommonRegParamsRevisionRP002101 CommonRegParamsRevision = "RP002_1_0_1"

	// CommonRegParamsRevisionRP002102 captures enum value "RP002_1_0_2"
	CommonRegParamsRevisionRP002102 CommonRegParamsRevision = "RP002_1_0_2"

	// CommonRegParamsRevisionRP002103 captures enum value "RP002_1_0_3"
	CommonRegParamsRevisionRP002103 CommonRegParamsRevision = "RP002_1_0_3"

	// CommonRegParamsRevisionRP002104 captures enum value "RP002_1_0_4"
	CommonRegParamsRevisionRP002104 CommonRegParamsRevision = "RP002_1_0_4"
)

// for schema
var commonRegParamsRevisionEnum []interface{}

func init() {
	var res []CommonRegParamsRevision
	if err := json.Unmarshal([]byte(`["A","B","RP002_1_0_0","RP002_1_0_1","RP002_1_0_2","RP002_1_0_3","RP002_1_0_4"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		commonRegParamsRevisionEnum = append(commonRegParamsRevisionEnum, v)
	}
}

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

// Validate validates this common reg params revision
func (m CommonRegParamsRevision) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this common reg params revision based on context it is used
func (m CommonRegParamsRevision) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
