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

// ListDevicesRequestOrderBy list devices request order by
//
// swagger:model ListDevicesRequestOrderBy
type ListDevicesRequestOrderBy string

func NewListDevicesRequestOrderBy(value ListDevicesRequestOrderBy) *ListDevicesRequestOrderBy {
	return &value
}

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

const (

	// ListDevicesRequestOrderByNAME captures enum value "NAME"
	ListDevicesRequestOrderByNAME ListDevicesRequestOrderBy = "NAME"

	// ListDevicesRequestOrderByDEVEUI captures enum value "DEV_EUI"
	ListDevicesRequestOrderByDEVEUI ListDevicesRequestOrderBy = "DEV_EUI"

	// ListDevicesRequestOrderByLASTSEENAT captures enum value "LAST_SEEN_AT"
	ListDevicesRequestOrderByLASTSEENAT ListDevicesRequestOrderBy = "LAST_SEEN_AT"

	// ListDevicesRequestOrderByDEVICEPROFILENAME captures enum value "DEVICE_PROFILE_NAME"
	ListDevicesRequestOrderByDEVICEPROFILENAME ListDevicesRequestOrderBy = "DEVICE_PROFILE_NAME"
)

// for schema
var listDevicesRequestOrderByEnum []interface{}

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

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

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

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

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

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