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

// V1alpha1IssuerAuthType IssuerAuthType represents the type of authentication mechanism used by the issuer.
//
//   - ISSUER_AUTH_TYPE_UNSPECIFIED: ISSUER_AUTH_TYPE_UNSPECIFIED represents an unspecified or unknown authentication type.
//   - ISSUER_AUTH_TYPE_IDP: ISSUER_AUTH_TYPE_IDP indicates that the issuer uses an external Identity Provider (IDP)
//
// to authenticate
//   - ISSUER_AUTH_TYPE_SELF: ISSUER_AUTH_TYPE_SELF indicates that the issuer uses a self-issued key for authentication.
//
// This is typically used in scenarios where the issuer doesn't rely on an IdP.
//
// swagger:model v1alpha1IssuerAuthType
type V1alpha1IssuerAuthType string

func NewV1alpha1IssuerAuthType(value V1alpha1IssuerAuthType) *V1alpha1IssuerAuthType {
	return &value
}

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

const (

	// V1alpha1IssuerAuthTypeISSUERAUTHTYPEUNSPECIFIED captures enum value "ISSUER_AUTH_TYPE_UNSPECIFIED"
	V1alpha1IssuerAuthTypeISSUERAUTHTYPEUNSPECIFIED V1alpha1IssuerAuthType = "ISSUER_AUTH_TYPE_UNSPECIFIED"

	// V1alpha1IssuerAuthTypeISSUERAUTHTYPEIDP captures enum value "ISSUER_AUTH_TYPE_IDP"
	V1alpha1IssuerAuthTypeISSUERAUTHTYPEIDP V1alpha1IssuerAuthType = "ISSUER_AUTH_TYPE_IDP"

	// V1alpha1IssuerAuthTypeISSUERAUTHTYPESELF captures enum value "ISSUER_AUTH_TYPE_SELF"
	V1alpha1IssuerAuthTypeISSUERAUTHTYPESELF V1alpha1IssuerAuthType = "ISSUER_AUTH_TYPE_SELF"
)

// for schema
var v1alpha1IssuerAuthTypeEnum []any

func init() {
	var res []V1alpha1IssuerAuthType
	if err := json.Unmarshal([]byte(`["ISSUER_AUTH_TYPE_UNSPECIFIED","ISSUER_AUTH_TYPE_IDP","ISSUER_AUTH_TYPE_SELF"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		v1alpha1IssuerAuthTypeEnum = append(v1alpha1IssuerAuthTypeEnum, v)
	}
}

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

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

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

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

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