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

// APIRelayModeActivation  - DISABLE_RELAY_MODE: Disable the relay mode.
//   - ENABLE_RELAY_MODE: Enable the relay model.
//   - DYNAMIC: Dynamic.
//   - END_DEVICE_CONTROLLED: End-device controlled.
//
// swagger:model apiRelayModeActivation
type APIRelayModeActivation string

func NewAPIRelayModeActivation(value APIRelayModeActivation) *APIRelayModeActivation {
	return &value
}

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

const (

	// APIRelayModeActivationDISABLERELAYMODE captures enum value "DISABLE_RELAY_MODE"
	APIRelayModeActivationDISABLERELAYMODE APIRelayModeActivation = "DISABLE_RELAY_MODE"

	// APIRelayModeActivationENABLERELAYMODE captures enum value "ENABLE_RELAY_MODE"
	APIRelayModeActivationENABLERELAYMODE APIRelayModeActivation = "ENABLE_RELAY_MODE"

	// APIRelayModeActivationDYNAMIC captures enum value "DYNAMIC"
	APIRelayModeActivationDYNAMIC APIRelayModeActivation = "DYNAMIC"

	// APIRelayModeActivationENDDEVICECONTROLLED captures enum value "END_DEVICE_CONTROLLED"
	APIRelayModeActivationENDDEVICECONTROLLED APIRelayModeActivation = "END_DEVICE_CONTROLLED"
)

// for schema
var apiRelayModeActivationEnum []interface{}

func init() {
	var res []APIRelayModeActivation
	if err := json.Unmarshal([]byte(`["DISABLE_RELAY_MODE","ENABLE_RELAY_MODE","DYNAMIC","END_DEVICE_CONTROLLED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiRelayModeActivationEnum = append(apiRelayModeActivationEnum, v)
	}
}

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

// Validate validates this api relay mode activation
func (m APIRelayModeActivation) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this api relay mode activation based on context it is used
func (m APIRelayModeActivation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
