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

// SupportLevel support level
//
// swagger:model support-level
type SupportLevel string

func NewSupportLevel(value SupportLevel) *SupportLevel {
	return &value
}

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

const (

	// SupportLevelSupported captures enum value "supported"
	SupportLevelSupported SupportLevel = "supported"

	// SupportLevelUnsupported captures enum value "unsupported"
	SupportLevelUnsupported SupportLevel = "unsupported"

	// SupportLevelTechPreview captures enum value "tech-preview"
	SupportLevelTechPreview SupportLevel = "tech-preview"

	// SupportLevelDevPreview captures enum value "dev-preview"
	SupportLevelDevPreview SupportLevel = "dev-preview"

	// SupportLevelUnavailable captures enum value "unavailable"
	SupportLevelUnavailable SupportLevel = "unavailable"
)

// for schema
var supportLevelEnum []interface{}

func init() {
	var res []SupportLevel
	if err := json.Unmarshal([]byte(`["supported","unsupported","tech-preview","dev-preview","unavailable"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		supportLevelEnum = append(supportLevelEnum, v)
	}
}

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

// Validate validates this support level
func (m SupportLevel) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this support level based on context it is used
func (m SupportLevel) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
