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

// ListGatewaysRequestOrderBy list gateways request order by
//
// swagger:model ListGatewaysRequestOrderBy
type ListGatewaysRequestOrderBy string

func NewListGatewaysRequestOrderBy(value ListGatewaysRequestOrderBy) *ListGatewaysRequestOrderBy {
	return &value
}

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

const (

	// ListGatewaysRequestOrderByNAME captures enum value "NAME"
	ListGatewaysRequestOrderByNAME ListGatewaysRequestOrderBy = "NAME"

	// ListGatewaysRequestOrderByGATEWAYID captures enum value "GATEWAY_ID"
	ListGatewaysRequestOrderByGATEWAYID ListGatewaysRequestOrderBy = "GATEWAY_ID"

	// ListGatewaysRequestOrderByLASTSEENAT captures enum value "LAST_SEEN_AT"
	ListGatewaysRequestOrderByLASTSEENAT ListGatewaysRequestOrderBy = "LAST_SEEN_AT"
)

// for schema
var listGatewaysRequestOrderByEnum []interface{}

func init() {
	var res []ListGatewaysRequestOrderBy
	if err := json.Unmarshal([]byte(`["NAME","GATEWAY_ID","LAST_SEEN_AT"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		listGatewaysRequestOrderByEnum = append(listGatewaysRequestOrderByEnum, v)
	}
}

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

// Validate validates this list gateways request order by
func (m ListGatewaysRequestOrderBy) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this list gateways request order by based on context it is used
func (m ListGatewaysRequestOrderBy) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
