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

// CommonMacVersion common mac version
//
// swagger:model commonMacVersion
type CommonMacVersion string

func NewCommonMacVersion(value CommonMacVersion) *CommonMacVersion {
	return &value
}

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

const (

	// CommonMacVersionLORAWAN100 captures enum value "LORAWAN_1_0_0"
	CommonMacVersionLORAWAN100 CommonMacVersion = "LORAWAN_1_0_0"

	// CommonMacVersionLORAWAN101 captures enum value "LORAWAN_1_0_1"
	CommonMacVersionLORAWAN101 CommonMacVersion = "LORAWAN_1_0_1"

	// CommonMacVersionLORAWAN102 captures enum value "LORAWAN_1_0_2"
	CommonMacVersionLORAWAN102 CommonMacVersion = "LORAWAN_1_0_2"

	// CommonMacVersionLORAWAN103 captures enum value "LORAWAN_1_0_3"
	CommonMacVersionLORAWAN103 CommonMacVersion = "LORAWAN_1_0_3"

	// CommonMacVersionLORAWAN104 captures enum value "LORAWAN_1_0_4"
	CommonMacVersionLORAWAN104 CommonMacVersion = "LORAWAN_1_0_4"

	// CommonMacVersionLORAWAN110 captures enum value "LORAWAN_1_1_0"
	CommonMacVersionLORAWAN110 CommonMacVersion = "LORAWAN_1_1_0"
)

// for schema
var commonMacVersionEnum []interface{}

func init() {
	var res []CommonMacVersion
	if err := json.Unmarshal([]byte(`["LORAWAN_1_0_0","LORAWAN_1_0_1","LORAWAN_1_0_2","LORAWAN_1_0_3","LORAWAN_1_0_4","LORAWAN_1_1_0"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		commonMacVersionEnum = append(commonMacVersionEnum, v)
	}
}

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

// Validate validates this common mac version
func (m CommonMacVersion) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this common mac version based on context it is used
func (m CommonMacVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
