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

// APIMulticastGroupSchedulingType  - DELAY: Delay.
// If multicast downlinks must be sent through multiple gateways, then
// these will be sent one by one with a delay between each gateway.
//   - GPS_TIME: Time.
//
// If multicast downlinks must be sent through multiple gateways, then
// these will be sent simultaneously using GPS time synchronization.
// Note that this does require GPS time-synchronized LoRa gateways.
//
// swagger:model apiMulticastGroupSchedulingType
type APIMulticastGroupSchedulingType string

func NewAPIMulticastGroupSchedulingType(value APIMulticastGroupSchedulingType) *APIMulticastGroupSchedulingType {
	return &value
}

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

const (

	// APIMulticastGroupSchedulingTypeDELAY captures enum value "DELAY"
	APIMulticastGroupSchedulingTypeDELAY APIMulticastGroupSchedulingType = "DELAY"

	// APIMulticastGroupSchedulingTypeGPSTIME captures enum value "GPS_TIME"
	APIMulticastGroupSchedulingTypeGPSTIME APIMulticastGroupSchedulingType = "GPS_TIME"
)

// for schema
var apiMulticastGroupSchedulingTypeEnum []interface{}

func init() {
	var res []APIMulticastGroupSchedulingType
	if err := json.Unmarshal([]byte(`["DELAY","GPS_TIME"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiMulticastGroupSchedulingTypeEnum = append(apiMulticastGroupSchedulingTypeEnum, v)
	}
}

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

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

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

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

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