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

// APIMulticastGroupType  - CLASS_C: Class C.
//   - CLASS_B: Class-B.
//
// swagger:model apiMulticastGroupType
type APIMulticastGroupType string

func NewAPIMulticastGroupType(value APIMulticastGroupType) *APIMulticastGroupType {
	return &value
}

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

const (

	// APIMulticastGroupTypeCLASSC captures enum value "CLASS_C"
	APIMulticastGroupTypeCLASSC APIMulticastGroupType = "CLASS_C"

	// APIMulticastGroupTypeCLASSB captures enum value "CLASS_B"
	APIMulticastGroupTypeCLASSB APIMulticastGroupType = "CLASS_B"
)

// for schema
var apiMulticastGroupTypeEnum []interface{}

func init() {
	var res []APIMulticastGroupType
	if err := json.Unmarshal([]byte(`["CLASS_C","CLASS_B"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiMulticastGroupTypeEnum = append(apiMulticastGroupTypeEnum, v)
	}
}

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

// Validate validates this api multicast group type
func (m APIMulticastGroupType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this api multicast group type based on context it is used
func (m APIMulticastGroupType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
