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

// V1alpha1IdpType Type
//
// - IDP_TYPE_UNSPECIFIED: Unspecified Envelope Type.
//   - IDP_TYPE_DUO: Idp Type Duo.
//   - IDP_TYPE_OKTA: Idp Type Okta.
//   - IDP_TYPE_ORY: Idp Type Ory.
//   - IDP_TYPE_SELF: Idp Type Self.
//
// swagger:model v1alpha1IdpType
type V1alpha1IdpType string

func NewV1alpha1IdpType(value V1alpha1IdpType) *V1alpha1IdpType {
	return &value
}

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

const (

	// V1alpha1IdpTypeIDPTYPEUNSPECIFIED captures enum value "IDP_TYPE_UNSPECIFIED"
	V1alpha1IdpTypeIDPTYPEUNSPECIFIED V1alpha1IdpType = "IDP_TYPE_UNSPECIFIED"

	// V1alpha1IdpTypeIDPTYPEDUO captures enum value "IDP_TYPE_DUO"
	V1alpha1IdpTypeIDPTYPEDUO V1alpha1IdpType = "IDP_TYPE_DUO"

	// V1alpha1IdpTypeIDPTYPEOKTA captures enum value "IDP_TYPE_OKTA"
	V1alpha1IdpTypeIDPTYPEOKTA V1alpha1IdpType = "IDP_TYPE_OKTA"

	// V1alpha1IdpTypeIDPTYPEORY captures enum value "IDP_TYPE_ORY"
	V1alpha1IdpTypeIDPTYPEORY V1alpha1IdpType = "IDP_TYPE_ORY"

	// V1alpha1IdpTypeIDPTYPESELF captures enum value "IDP_TYPE_SELF"
	V1alpha1IdpTypeIDPTYPESELF V1alpha1IdpType = "IDP_TYPE_SELF"
)

// for schema
var v1alpha1IdpTypeEnum []any

func init() {
	var res []V1alpha1IdpType
	if err := json.Unmarshal([]byte(`["IDP_TYPE_UNSPECIFIED","IDP_TYPE_DUO","IDP_TYPE_OKTA","IDP_TYPE_ORY","IDP_TYPE_SELF"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		v1alpha1IdpTypeEnum = append(v1alpha1IdpTypeEnum, v)
	}
}

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

// Validate validates this v1alpha1 idp type
func (m V1alpha1IdpType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this v1alpha1 idp type based on context it is used
func (m V1alpha1IdpType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
