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

// V1alpha1CredentialEnvelopeType The Envelope Type of the Credential.
// Multiple envelope types can be supported: Embedded Proof, JOSE, COSE etc.
//
//   - CREDENTIAL_ENVELOPE_TYPE_UNSPECIFIED: Unspecified Envelope Type.
//   - CREDENTIAL_ENVELOPE_TYPE_EMBEDDED_PROOF: Embedded Proof Envelope Type.
//   - CREDENTIAL_ENVELOPE_TYPE_JOSE: JOSE Envelope Type.
//
// swagger:model v1alpha1CredentialEnvelopeType
type V1alpha1CredentialEnvelopeType string

func NewV1alpha1CredentialEnvelopeType(value V1alpha1CredentialEnvelopeType) *V1alpha1CredentialEnvelopeType {
	return &value
}

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

const (

	// V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEUNSPECIFIED captures enum value "CREDENTIAL_ENVELOPE_TYPE_UNSPECIFIED"
	V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEUNSPECIFIED V1alpha1CredentialEnvelopeType = "CREDENTIAL_ENVELOPE_TYPE_UNSPECIFIED"

	// V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEEMBEDDEDPROOF captures enum value "CREDENTIAL_ENVELOPE_TYPE_EMBEDDED_PROOF"
	V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEEMBEDDEDPROOF V1alpha1CredentialEnvelopeType = "CREDENTIAL_ENVELOPE_TYPE_EMBEDDED_PROOF"

	// V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEJOSE captures enum value "CREDENTIAL_ENVELOPE_TYPE_JOSE"
	V1alpha1CredentialEnvelopeTypeCREDENTIALENVELOPETYPEJOSE V1alpha1CredentialEnvelopeType = "CREDENTIAL_ENVELOPE_TYPE_JOSE"
)

// for schema
var v1alpha1CredentialEnvelopeTypeEnum []any

func init() {
	var res []V1alpha1CredentialEnvelopeType
	if err := json.Unmarshal([]byte(`["CREDENTIAL_ENVELOPE_TYPE_UNSPECIFIED","CREDENTIAL_ENVELOPE_TYPE_EMBEDDED_PROOF","CREDENTIAL_ENVELOPE_TYPE_JOSE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		v1alpha1CredentialEnvelopeTypeEnum = append(v1alpha1CredentialEnvelopeTypeEnum, v)
	}
}

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

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

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

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

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