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

// APIGatewayState  - NEVER_SEEN: The gateway has never sent any stats.
//   - ONLINE: Online.
//   - OFFLINE: Offline.
//
// swagger:model apiGatewayState
type APIGatewayState string

func NewAPIGatewayState(value APIGatewayState) *APIGatewayState {
	return &value
}

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

const (

	// APIGatewayStateNEVERSEEN captures enum value "NEVER_SEEN"
	APIGatewayStateNEVERSEEN APIGatewayState = "NEVER_SEEN"

	// APIGatewayStateONLINE captures enum value "ONLINE"
	APIGatewayStateONLINE APIGatewayState = "ONLINE"

	// APIGatewayStateOFFLINE captures enum value "OFFLINE"
	APIGatewayStateOFFLINE APIGatewayState = "OFFLINE"
)

// for schema
var apiGatewayStateEnum []interface{}

func init() {
	var res []APIGatewayState
	if err := json.Unmarshal([]byte(`["NEVER_SEEN","ONLINE","OFFLINE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		apiGatewayStateEnum = append(apiGatewayStateEnum, v)
	}
}

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

// Validate validates this api gateway state
func (m APIGatewayState) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this api gateway state based on context it is used
func (m APIGatewayState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
