// This file was autogenerated by go-to-protobuf. Do not edit it manually!

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        (unknown)
// source: agntcy/identity/core/v1alpha1/errors.proto

package identity_core_sdk_go

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Represents the reason for an error, providing a unique
// constant value for the error.
type ErrorReason int32

const (
	// ERROR_REASON_UNSPECIFIED indicates that no specific error reason
	// has been specified.
	ErrorReason_ERROR_REASON_UNSPECIFIED ErrorReason = 0
	// An internal error, this happens in case of unexpected condition or failure within the service
	ErrorReason_ERROR_REASON_INTERNAL ErrorReason = 1
	// The credential envelope type is invalid. For valid values refer to
	// the enum CredentialEnvelopeType.
	ErrorReason_ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_TYPE ErrorReason = 2
	// The credential envelope value format does not correspond to the format
	// specified in envelope_type.
	ErrorReason_ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_VALUE_FORMAT ErrorReason = 3
	// The issuer contains one or more invalid fields.
	ErrorReason_ERROR_REASON_INVALID_ISSUER ErrorReason = 4
	// The issuer is not registered in the Node.
	ErrorReason_ERROR_REASON_ISSUER_NOT_REGISTERED ErrorReason = 5
	// The Verifiable Credential is invalid, this can be related to either
	// invalid format or unable to verify the Data Integrity proof.
	ErrorReason_ERROR_REASON_INVALID_VERIFIABLE_CREDENTIAL ErrorReason = 6
	// The Identity Provider (IdP) is required for the operation, but it is not provided.
	ErrorReason_ERROR_REASON_IDP_REQUIRED ErrorReason = 7
	// The proof is invalid
	ErrorReason_ERROR_REASON_INVALID_PROOF ErrorReason = 8
	// The proof type is not supported
	ErrorReason_ERROR_REASON_UNSUPPORTED_PROOF ErrorReason = 9
	// Unable to resolve an ID to a ResolverMetadata
	ErrorReason_ERROR_REASON_RESOLVER_METADATA_NOT_FOUND ErrorReason = 10
	// Unknown Identity Provider
	ErrorReason_ERROR_REASON_UNKNOWN_IDP ErrorReason = 11
	// The ID and Resolver Metadata are already registered in the system
	ErrorReason_ERROR_REASON_ID_ALREADY_REGISTERED ErrorReason = 12
	// The Verifiable Credential is revoked
	ErrorReason_ERROR_REASON_VERIFIABLE_CREDENTIAL_REVOKED ErrorReason = 13
)

// Enum value maps for ErrorReason.
var (
	ErrorReason_name = map[int32]string{
		0:  "ERROR_REASON_UNSPECIFIED",
		1:  "ERROR_REASON_INTERNAL",
		2:  "ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_TYPE",
		3:  "ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_VALUE_FORMAT",
		4:  "ERROR_REASON_INVALID_ISSUER",
		5:  "ERROR_REASON_ISSUER_NOT_REGISTERED",
		6:  "ERROR_REASON_INVALID_VERIFIABLE_CREDENTIAL",
		7:  "ERROR_REASON_IDP_REQUIRED",
		8:  "ERROR_REASON_INVALID_PROOF",
		9:  "ERROR_REASON_UNSUPPORTED_PROOF",
		10: "ERROR_REASON_RESOLVER_METADATA_NOT_FOUND",
		11: "ERROR_REASON_UNKNOWN_IDP",
		12: "ERROR_REASON_ID_ALREADY_REGISTERED",
		13: "ERROR_REASON_VERIFIABLE_CREDENTIAL_REVOKED",
	}
	ErrorReason_value = map[string]int32{
		"ERROR_REASON_UNSPECIFIED":                              0,
		"ERROR_REASON_INTERNAL":                                 1,
		"ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_TYPE":         2,
		"ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_VALUE_FORMAT": 3,
		"ERROR_REASON_INVALID_ISSUER":                           4,
		"ERROR_REASON_ISSUER_NOT_REGISTERED":                    5,
		"ERROR_REASON_INVALID_VERIFIABLE_CREDENTIAL":            6,
		"ERROR_REASON_IDP_REQUIRED":                             7,
		"ERROR_REASON_INVALID_PROOF":                            8,
		"ERROR_REASON_UNSUPPORTED_PROOF":                        9,
		"ERROR_REASON_RESOLVER_METADATA_NOT_FOUND":              10,
		"ERROR_REASON_UNKNOWN_IDP":                              11,
		"ERROR_REASON_ID_ALREADY_REGISTERED":                    12,
		"ERROR_REASON_VERIFIABLE_CREDENTIAL_REVOKED":            13,
	}
)

func (x ErrorReason) Enum() *ErrorReason {
	p := new(ErrorReason)
	*p = x
	return p
}

func (x ErrorReason) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (ErrorReason) Descriptor() protoreflect.EnumDescriptor {
	return file_agntcy_identity_core_v1alpha1_errors_proto_enumTypes[0].Descriptor()
}

func (ErrorReason) Type() protoreflect.EnumType {
	return &file_agntcy_identity_core_v1alpha1_errors_proto_enumTypes[0]
}

func (x ErrorReason) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) EnumDescriptor() ([]byte, []int) {
	return file_agntcy_identity_core_v1alpha1_errors_proto_rawDescGZIP(), []int{0}
}

// Describes the cause of the error with structured details.
type ErrorInfo struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The reason of the error, as defined by the ErrorReason enum.
	// This is a constant unique value that helps identify the cause of
	// the error.
	Reason *ErrorReason `protobuf:"varint,1,opt,name=reason,proto3,enum=agntcy.identity.core.v1alpha1.ErrorReason,oneof" json:"reason,omitempty"`
	// The message describing the error in a human-readable way. This
	// field gives additional details about the error.
	Message       *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ErrorInfo) Reset() {
	*x = ErrorInfo{}
	mi := &file_agntcy_identity_core_v1alpha1_errors_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ErrorInfo) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ErrorInfo) ProtoMessage() {}

func (x *ErrorInfo) ProtoReflect() protoreflect.Message {
	mi := &file_agntcy_identity_core_v1alpha1_errors_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use ErrorInfo.ProtoReflect.Descriptor instead.
func (*ErrorInfo) Descriptor() ([]byte, []int) {
	return file_agntcy_identity_core_v1alpha1_errors_proto_rawDescGZIP(), []int{0}
}

func (x *ErrorInfo) GetReason() ErrorReason {
	if x != nil && x.Reason != nil {
		return *x.Reason
	}
	return ErrorReason_ERROR_REASON_UNSPECIFIED
}

func (x *ErrorInfo) GetMessage() string {
	if x != nil && x.Message != nil {
		return *x.Message
	}
	return ""
}

var File_agntcy_identity_core_v1alpha1_errors_proto protoreflect.FileDescriptor

const file_agntcy_identity_core_v1alpha1_errors_proto_rawDesc = "" +
	"\n" +
	"*agntcy/identity/core/v1alpha1/errors.proto\x12\x1dagntcy.identity.core.v1alpha1\"\x8a\x01\n" +
	"\tErrorInfo\x12G\n" +
	"\x06reason\x18\x01 \x01(\x0e2*.agntcy.identity.core.v1alpha1.ErrorReasonH\x00R\x06reason\x88\x01\x01\x12\x1d\n" +
	"\amessage\x18\x02 \x01(\tH\x01R\amessage\x88\x01\x01B\t\n" +
	"\a_reasonB\n" +
	"\n" +
	"\b_message*\xb4\x04\n" +
	"\vErrorReason\x12\x1c\n" +
	"\x18ERROR_REASON_UNSPECIFIED\x10\x00\x12\x19\n" +
	"\x15ERROR_REASON_INTERNAL\x10\x01\x121\n" +
	"-ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_TYPE\x10\x02\x129\n" +
	"5ERROR_REASON_INVALID_CREDENTIAL_ENVELOPE_VALUE_FORMAT\x10\x03\x12\x1f\n" +
	"\x1bERROR_REASON_INVALID_ISSUER\x10\x04\x12&\n" +
	"\"ERROR_REASON_ISSUER_NOT_REGISTERED\x10\x05\x12.\n" +
	"*ERROR_REASON_INVALID_VERIFIABLE_CREDENTIAL\x10\x06\x12\x1d\n" +
	"\x19ERROR_REASON_IDP_REQUIRED\x10\a\x12\x1e\n" +
	"\x1aERROR_REASON_INVALID_PROOF\x10\b\x12\"\n" +
	"\x1eERROR_REASON_UNSUPPORTED_PROOF\x10\t\x12,\n" +
	"(ERROR_REASON_RESOLVER_METADATA_NOT_FOUND\x10\n" +
	"\x12\x1c\n" +
	"\x18ERROR_REASON_UNKNOWN_IDP\x10\v\x12&\n" +
	"\"ERROR_REASON_ID_ALREADY_REGISTERED\x10\f\x12.\n" +
	"*ERROR_REASON_VERIFIABLE_CREDENTIAL_REVOKED\x10\rBZZXgithub.com/agntcy/identity/api/server/agntcy/identity/core/v1alpha1;identity_core_sdk_gob\x06proto3"

var (
	file_agntcy_identity_core_v1alpha1_errors_proto_rawDescOnce sync.Once
	file_agntcy_identity_core_v1alpha1_errors_proto_rawDescData []byte
)

func file_agntcy_identity_core_v1alpha1_errors_proto_rawDescGZIP() []byte {
	file_agntcy_identity_core_v1alpha1_errors_proto_rawDescOnce.Do(func() {
		file_agntcy_identity_core_v1alpha1_errors_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_agntcy_identity_core_v1alpha1_errors_proto_rawDesc), len(file_agntcy_identity_core_v1alpha1_errors_proto_rawDesc)))
	})
	return file_agntcy_identity_core_v1alpha1_errors_proto_rawDescData
}

var file_agntcy_identity_core_v1alpha1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_agntcy_identity_core_v1alpha1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_agntcy_identity_core_v1alpha1_errors_proto_goTypes = []any{
	(ErrorReason)(0),  // 0: agntcy.identity.core.v1alpha1.ErrorReason
	(*ErrorInfo)(nil), // 1: agntcy.identity.core.v1alpha1.ErrorInfo
}
var file_agntcy_identity_core_v1alpha1_errors_proto_depIdxs = []int32{
	0, // 0: agntcy.identity.core.v1alpha1.ErrorInfo.reason:type_name -> agntcy.identity.core.v1alpha1.ErrorReason
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_agntcy_identity_core_v1alpha1_errors_proto_init() }
func file_agntcy_identity_core_v1alpha1_errors_proto_init() {
	if File_agntcy_identity_core_v1alpha1_errors_proto != nil {
		return
	}
	file_agntcy_identity_core_v1alpha1_errors_proto_msgTypes[0].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_agntcy_identity_core_v1alpha1_errors_proto_rawDesc), len(file_agntcy_identity_core_v1alpha1_errors_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_agntcy_identity_core_v1alpha1_errors_proto_goTypes,
		DependencyIndexes: file_agntcy_identity_core_v1alpha1_errors_proto_depIdxs,
		EnumInfos:         file_agntcy_identity_core_v1alpha1_errors_proto_enumTypes,
		MessageInfos:      file_agntcy_identity_core_v1alpha1_errors_proto_msgTypes,
	}.Build()
	File_agntcy_identity_core_v1alpha1_errors_proto = out.File
	file_agntcy_identity_core_v1alpha1_errors_proto_goTypes = nil
	file_agntcy_identity_core_v1alpha1_errors_proto_depIdxs = nil
}
