Files
sonr/api/did/v1/models.pulsar.go
T

10268 lines
352 KiB
Go

// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package didv1
import (
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
_ "github.com/cosmos/gogoproto/gogoproto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"
sort "sort"
sync "sync"
)
var (
md_Alias protoreflect.MessageDescriptor
fd_Alias_subject protoreflect.FieldDescriptor
fd_Alias_origin protoreflect.FieldDescriptor
fd_Alias_controller protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Alias = File_did_v1_models_proto.Messages().ByName("Alias")
fd_Alias_subject = md_Alias.Fields().ByName("subject")
fd_Alias_origin = md_Alias.Fields().ByName("origin")
fd_Alias_controller = md_Alias.Fields().ByName("controller")
}
var _ protoreflect.Message = (*fastReflection_Alias)(nil)
type fastReflection_Alias Alias
func (x *Alias) ProtoReflect() protoreflect.Message {
return (*fastReflection_Alias)(x)
}
func (x *Alias) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Alias_messageType fastReflection_Alias_messageType
var _ protoreflect.MessageType = fastReflection_Alias_messageType{}
type fastReflection_Alias_messageType struct{}
func (x fastReflection_Alias_messageType) Zero() protoreflect.Message {
return (*fastReflection_Alias)(nil)
}
func (x fastReflection_Alias_messageType) New() protoreflect.Message {
return new(fastReflection_Alias)
}
func (x fastReflection_Alias_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Alias
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Alias) Descriptor() protoreflect.MessageDescriptor {
return md_Alias
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Alias) Type() protoreflect.MessageType {
return _fastReflection_Alias_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Alias) New() protoreflect.Message {
return new(fastReflection_Alias)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Alias) Interface() protoreflect.ProtoMessage {
return (*Alias)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Alias) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Subject != "" {
value := protoreflect.ValueOfString(x.Subject)
if !f(fd_Alias_subject, value) {
return
}
}
if x.Origin != "" {
value := protoreflect.ValueOfString(x.Origin)
if !f(fd_Alias_origin, value) {
return
}
}
if x.Controller != "" {
value := protoreflect.ValueOfString(x.Controller)
if !f(fd_Alias_controller, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Alias) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Alias.subject":
return x.Subject != ""
case "did.v1.Alias.origin":
return x.Origin != ""
case "did.v1.Alias.controller":
return x.Controller != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Alias) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Alias.subject":
x.Subject = ""
case "did.v1.Alias.origin":
x.Origin = ""
case "did.v1.Alias.controller":
x.Controller = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Alias) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Alias.subject":
value := x.Subject
return protoreflect.ValueOfString(value)
case "did.v1.Alias.origin":
value := x.Origin
return protoreflect.ValueOfString(value)
case "did.v1.Alias.controller":
value := x.Controller
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Alias) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Alias.subject":
x.Subject = value.Interface().(string)
case "did.v1.Alias.origin":
x.Origin = value.Interface().(string)
case "did.v1.Alias.controller":
x.Controller = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Alias) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Alias.subject":
panic(fmt.Errorf("field subject of message did.v1.Alias is not mutable"))
case "did.v1.Alias.origin":
panic(fmt.Errorf("field origin of message did.v1.Alias is not mutable"))
case "did.v1.Alias.controller":
panic(fmt.Errorf("field controller of message did.v1.Alias is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Alias) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Alias.subject":
return protoreflect.ValueOfString("")
case "did.v1.Alias.origin":
return protoreflect.ValueOfString("")
case "did.v1.Alias.controller":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Alias"))
}
panic(fmt.Errorf("message did.v1.Alias does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Alias) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Alias", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Alias) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Alias) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Alias) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Alias) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Alias)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
l = len(x.Subject)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Origin)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Controller)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Alias)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.Controller) > 0 {
i -= len(x.Controller)
copy(dAtA[i:], x.Controller)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
i--
dAtA[i] = 0x1a
}
if len(x.Origin) > 0 {
i -= len(x.Origin)
copy(dAtA[i:], x.Origin)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin)))
i--
dAtA[i] = 0x12
}
if len(x.Subject) > 0 {
i -= len(x.Subject)
copy(dAtA[i:], x.Subject)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Alias)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Alias: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var _ protoreflect.List = (*_Credential_6_list)(nil)
type _Credential_6_list struct {
list *[]string
}
func (x *_Credential_6_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Credential_6_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Credential_6_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Credential_6_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Credential_6_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind"))
}
func (x *_Credential_6_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Credential_6_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Credential_6_list) IsValid() bool {
return x.list != nil
}
var (
md_Credential protoreflect.MessageDescriptor
fd_Credential_subject protoreflect.FieldDescriptor
fd_Credential_attestation_type protoreflect.FieldDescriptor
fd_Credential_origin protoreflect.FieldDescriptor
fd_Credential_credential_id protoreflect.FieldDescriptor
fd_Credential_public_key protoreflect.FieldDescriptor
fd_Credential_transport protoreflect.FieldDescriptor
fd_Credential_sign_count protoreflect.FieldDescriptor
fd_Credential_user_present protoreflect.FieldDescriptor
fd_Credential_user_verified protoreflect.FieldDescriptor
fd_Credential_backup_eligible protoreflect.FieldDescriptor
fd_Credential_backup_state protoreflect.FieldDescriptor
fd_Credential_clone_warning protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Credential = File_did_v1_models_proto.Messages().ByName("Credential")
fd_Credential_subject = md_Credential.Fields().ByName("subject")
fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type")
fd_Credential_origin = md_Credential.Fields().ByName("origin")
fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id")
fd_Credential_public_key = md_Credential.Fields().ByName("public_key")
fd_Credential_transport = md_Credential.Fields().ByName("transport")
fd_Credential_sign_count = md_Credential.Fields().ByName("sign_count")
fd_Credential_user_present = md_Credential.Fields().ByName("user_present")
fd_Credential_user_verified = md_Credential.Fields().ByName("user_verified")
fd_Credential_backup_eligible = md_Credential.Fields().ByName("backup_eligible")
fd_Credential_backup_state = md_Credential.Fields().ByName("backup_state")
fd_Credential_clone_warning = md_Credential.Fields().ByName("clone_warning")
}
var _ protoreflect.Message = (*fastReflection_Credential)(nil)
type fastReflection_Credential Credential
func (x *Credential) ProtoReflect() protoreflect.Message {
return (*fastReflection_Credential)(x)
}
func (x *Credential) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Credential_messageType fastReflection_Credential_messageType
var _ protoreflect.MessageType = fastReflection_Credential_messageType{}
type fastReflection_Credential_messageType struct{}
func (x fastReflection_Credential_messageType) Zero() protoreflect.Message {
return (*fastReflection_Credential)(nil)
}
func (x fastReflection_Credential_messageType) New() protoreflect.Message {
return new(fastReflection_Credential)
}
func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Credential
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor {
return md_Credential
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Credential) Type() protoreflect.MessageType {
return _fastReflection_Credential_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Credential) New() protoreflect.Message {
return new(fastReflection_Credential)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage {
return (*Credential)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Subject != "" {
value := protoreflect.ValueOfString(x.Subject)
if !f(fd_Credential_subject, value) {
return
}
}
if x.AttestationType != "" {
value := protoreflect.ValueOfString(x.AttestationType)
if !f(fd_Credential_attestation_type, value) {
return
}
}
if x.Origin != "" {
value := protoreflect.ValueOfString(x.Origin)
if !f(fd_Credential_origin, value) {
return
}
}
if len(x.CredentialId) != 0 {
value := protoreflect.ValueOfBytes(x.CredentialId)
if !f(fd_Credential_credential_id, value) {
return
}
}
if len(x.PublicKey) != 0 {
value := protoreflect.ValueOfBytes(x.PublicKey)
if !f(fd_Credential_public_key, value) {
return
}
}
if len(x.Transport) != 0 {
value := protoreflect.ValueOfList(&_Credential_6_list{list: &x.Transport})
if !f(fd_Credential_transport, value) {
return
}
}
if x.SignCount != uint32(0) {
value := protoreflect.ValueOfUint32(x.SignCount)
if !f(fd_Credential_sign_count, value) {
return
}
}
if x.UserPresent != false {
value := protoreflect.ValueOfBool(x.UserPresent)
if !f(fd_Credential_user_present, value) {
return
}
}
if x.UserVerified != false {
value := protoreflect.ValueOfBool(x.UserVerified)
if !f(fd_Credential_user_verified, value) {
return
}
}
if x.BackupEligible != false {
value := protoreflect.ValueOfBool(x.BackupEligible)
if !f(fd_Credential_backup_eligible, value) {
return
}
}
if x.BackupState != false {
value := protoreflect.ValueOfBool(x.BackupState)
if !f(fd_Credential_backup_state, value) {
return
}
}
if x.CloneWarning != false {
value := protoreflect.ValueOfBool(x.CloneWarning)
if !f(fd_Credential_clone_warning, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Credential.subject":
return x.Subject != ""
case "did.v1.Credential.attestation_type":
return x.AttestationType != ""
case "did.v1.Credential.origin":
return x.Origin != ""
case "did.v1.Credential.credential_id":
return len(x.CredentialId) != 0
case "did.v1.Credential.public_key":
return len(x.PublicKey) != 0
case "did.v1.Credential.transport":
return len(x.Transport) != 0
case "did.v1.Credential.sign_count":
return x.SignCount != uint32(0)
case "did.v1.Credential.user_present":
return x.UserPresent != false
case "did.v1.Credential.user_verified":
return x.UserVerified != false
case "did.v1.Credential.backup_eligible":
return x.BackupEligible != false
case "did.v1.Credential.backup_state":
return x.BackupState != false
case "did.v1.Credential.clone_warning":
return x.CloneWarning != false
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Credential.subject":
x.Subject = ""
case "did.v1.Credential.attestation_type":
x.AttestationType = ""
case "did.v1.Credential.origin":
x.Origin = ""
case "did.v1.Credential.credential_id":
x.CredentialId = nil
case "did.v1.Credential.public_key":
x.PublicKey = nil
case "did.v1.Credential.transport":
x.Transport = nil
case "did.v1.Credential.sign_count":
x.SignCount = uint32(0)
case "did.v1.Credential.user_present":
x.UserPresent = false
case "did.v1.Credential.user_verified":
x.UserVerified = false
case "did.v1.Credential.backup_eligible":
x.BackupEligible = false
case "did.v1.Credential.backup_state":
x.BackupState = false
case "did.v1.Credential.clone_warning":
x.CloneWarning = false
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Credential.subject":
value := x.Subject
return protoreflect.ValueOfString(value)
case "did.v1.Credential.attestation_type":
value := x.AttestationType
return protoreflect.ValueOfString(value)
case "did.v1.Credential.origin":
value := x.Origin
return protoreflect.ValueOfString(value)
case "did.v1.Credential.credential_id":
value := x.CredentialId
return protoreflect.ValueOfBytes(value)
case "did.v1.Credential.public_key":
value := x.PublicKey
return protoreflect.ValueOfBytes(value)
case "did.v1.Credential.transport":
if len(x.Transport) == 0 {
return protoreflect.ValueOfList(&_Credential_6_list{})
}
listValue := &_Credential_6_list{list: &x.Transport}
return protoreflect.ValueOfList(listValue)
case "did.v1.Credential.sign_count":
value := x.SignCount
return protoreflect.ValueOfUint32(value)
case "did.v1.Credential.user_present":
value := x.UserPresent
return protoreflect.ValueOfBool(value)
case "did.v1.Credential.user_verified":
value := x.UserVerified
return protoreflect.ValueOfBool(value)
case "did.v1.Credential.backup_eligible":
value := x.BackupEligible
return protoreflect.ValueOfBool(value)
case "did.v1.Credential.backup_state":
value := x.BackupState
return protoreflect.ValueOfBool(value)
case "did.v1.Credential.clone_warning":
value := x.CloneWarning
return protoreflect.ValueOfBool(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Credential.subject":
x.Subject = value.Interface().(string)
case "did.v1.Credential.attestation_type":
x.AttestationType = value.Interface().(string)
case "did.v1.Credential.origin":
x.Origin = value.Interface().(string)
case "did.v1.Credential.credential_id":
x.CredentialId = value.Bytes()
case "did.v1.Credential.public_key":
x.PublicKey = value.Bytes()
case "did.v1.Credential.transport":
lv := value.List()
clv := lv.(*_Credential_6_list)
x.Transport = *clv.list
case "did.v1.Credential.sign_count":
x.SignCount = uint32(value.Uint())
case "did.v1.Credential.user_present":
x.UserPresent = value.Bool()
case "did.v1.Credential.user_verified":
x.UserVerified = value.Bool()
case "did.v1.Credential.backup_eligible":
x.BackupEligible = value.Bool()
case "did.v1.Credential.backup_state":
x.BackupState = value.Bool()
case "did.v1.Credential.clone_warning":
x.CloneWarning = value.Bool()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Credential.transport":
if x.Transport == nil {
x.Transport = []string{}
}
value := &_Credential_6_list{list: &x.Transport}
return protoreflect.ValueOfList(value)
case "did.v1.Credential.subject":
panic(fmt.Errorf("field subject of message did.v1.Credential is not mutable"))
case "did.v1.Credential.attestation_type":
panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable"))
case "did.v1.Credential.origin":
panic(fmt.Errorf("field origin of message did.v1.Credential is not mutable"))
case "did.v1.Credential.credential_id":
panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable"))
case "did.v1.Credential.public_key":
panic(fmt.Errorf("field public_key of message did.v1.Credential is not mutable"))
case "did.v1.Credential.sign_count":
panic(fmt.Errorf("field sign_count of message did.v1.Credential is not mutable"))
case "did.v1.Credential.user_present":
panic(fmt.Errorf("field user_present of message did.v1.Credential is not mutable"))
case "did.v1.Credential.user_verified":
panic(fmt.Errorf("field user_verified of message did.v1.Credential is not mutable"))
case "did.v1.Credential.backup_eligible":
panic(fmt.Errorf("field backup_eligible of message did.v1.Credential is not mutable"))
case "did.v1.Credential.backup_state":
panic(fmt.Errorf("field backup_state of message did.v1.Credential is not mutable"))
case "did.v1.Credential.clone_warning":
panic(fmt.Errorf("field clone_warning of message did.v1.Credential is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Credential.subject":
return protoreflect.ValueOfString("")
case "did.v1.Credential.attestation_type":
return protoreflect.ValueOfString("")
case "did.v1.Credential.origin":
return protoreflect.ValueOfString("")
case "did.v1.Credential.credential_id":
return protoreflect.ValueOfBytes(nil)
case "did.v1.Credential.public_key":
return protoreflect.ValueOfBytes(nil)
case "did.v1.Credential.transport":
list := []string{}
return protoreflect.ValueOfList(&_Credential_6_list{list: &list})
case "did.v1.Credential.sign_count":
return protoreflect.ValueOfUint32(uint32(0))
case "did.v1.Credential.user_present":
return protoreflect.ValueOfBool(false)
case "did.v1.Credential.user_verified":
return protoreflect.ValueOfBool(false)
case "did.v1.Credential.backup_eligible":
return protoreflect.ValueOfBool(false)
case "did.v1.Credential.backup_state":
return protoreflect.ValueOfBool(false)
case "did.v1.Credential.clone_warning":
return protoreflect.ValueOfBool(false)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
}
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Credential", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Credential) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Credential)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
l = len(x.Subject)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.AttestationType)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Origin)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.CredentialId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.PublicKey)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if len(x.Transport) > 0 {
for _, s := range x.Transport {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if x.SignCount != 0 {
n += 1 + runtime.Sov(uint64(x.SignCount))
}
if x.UserPresent {
n += 2
}
if x.UserVerified {
n += 2
}
if x.BackupEligible {
n += 2
}
if x.BackupState {
n += 2
}
if x.CloneWarning {
n += 2
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Credential)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.CloneWarning {
i--
if x.CloneWarning {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x60
}
if x.BackupState {
i--
if x.BackupState {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x58
}
if x.BackupEligible {
i--
if x.BackupEligible {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x50
}
if x.UserVerified {
i--
if x.UserVerified {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x48
}
if x.UserPresent {
i--
if x.UserPresent {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x40
}
if x.SignCount != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.SignCount))
i--
dAtA[i] = 0x38
}
if len(x.Transport) > 0 {
for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.Transport[iNdEx])
copy(dAtA[i:], x.Transport[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Transport[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if len(x.PublicKey) > 0 {
i -= len(x.PublicKey)
copy(dAtA[i:], x.PublicKey)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey)))
i--
dAtA[i] = 0x2a
}
if len(x.CredentialId) > 0 {
i -= len(x.CredentialId)
copy(dAtA[i:], x.CredentialId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId)))
i--
dAtA[i] = 0x22
}
if len(x.Origin) > 0 {
i -= len(x.Origin)
copy(dAtA[i:], x.Origin)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin)))
i--
dAtA[i] = 0x1a
}
if len(x.AttestationType) > 0 {
i -= len(x.AttestationType)
copy(dAtA[i:], x.AttestationType)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType)))
i--
dAtA[i] = 0x12
}
if len(x.Subject) > 0 {
i -= len(x.Subject)
copy(dAtA[i:], x.Subject)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Credential)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.AttestationType = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...)
if x.CredentialId == nil {
x.CredentialId = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if x.PublicKey == nil {
x.PublicKey = []byte{}
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 7:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SignCount", wireType)
}
x.SignCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.SignCount |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserPresent", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.UserPresent = bool(v != 0)
case 9:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserVerified", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.UserVerified = bool(v != 0)
case 10:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupEligible", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.BackupEligible = bool(v != 0)
case 11:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BackupState", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.BackupState = bool(v != 0)
case 12:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CloneWarning", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.CloneWarning = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var _ protoreflect.List = (*_Document_3_list)(nil)
type _Document_3_list struct {
list *[]string
}
func (x *_Document_3_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Document_3_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Document_3_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Document_3_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Document_3_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind"))
}
func (x *_Document_3_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Document_3_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Document_3_list) IsValid() bool {
return x.list != nil
}
var _ protoreflect.List = (*_Document_4_list)(nil)
type _Document_4_list struct {
list *[]string
}
func (x *_Document_4_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Document_4_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Document_4_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Document_4_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Document_4_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind"))
}
func (x *_Document_4_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Document_4_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Document_4_list) IsValid() bool {
return x.list != nil
}
var _ protoreflect.List = (*_Document_5_list)(nil)
type _Document_5_list struct {
list *[]string
}
func (x *_Document_5_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Document_5_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Document_5_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Document_5_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Document_5_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind"))
}
func (x *_Document_5_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Document_5_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Document_5_list) IsValid() bool {
return x.list != nil
}
var _ protoreflect.List = (*_Document_6_list)(nil)
type _Document_6_list struct {
list *[]string
}
func (x *_Document_6_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Document_6_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Document_6_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Document_6_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Document_6_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind"))
}
func (x *_Document_6_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Document_6_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Document_6_list) IsValid() bool {
return x.list != nil
}
var _ protoreflect.List = (*_Document_7_list)(nil)
type _Document_7_list struct {
list *[]string
}
func (x *_Document_7_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Document_7_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfString((*x.list)[i])
}
func (x *_Document_7_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.list)[i] = concreteValue
}
func (x *_Document_7_list) Append(value protoreflect.Value) {
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
*x.list = append(*x.list, concreteValue)
}
func (x *_Document_7_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind"))
}
func (x *_Document_7_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Document_7_list) NewElement() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Document_7_list) IsValid() bool {
return x.list != nil
}
var (
md_Document protoreflect.MessageDescriptor
fd_Document_id protoreflect.FieldDescriptor
fd_Document_controller protoreflect.FieldDescriptor
fd_Document_authentication protoreflect.FieldDescriptor
fd_Document_assertion_method protoreflect.FieldDescriptor
fd_Document_capability_delegation protoreflect.FieldDescriptor
fd_Document_capability_invocation protoreflect.FieldDescriptor
fd_Document_service protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Document = File_did_v1_models_proto.Messages().ByName("Document")
fd_Document_id = md_Document.Fields().ByName("id")
fd_Document_controller = md_Document.Fields().ByName("controller")
fd_Document_authentication = md_Document.Fields().ByName("authentication")
fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method")
fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation")
fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation")
fd_Document_service = md_Document.Fields().ByName("service")
}
var _ protoreflect.Message = (*fastReflection_Document)(nil)
type fastReflection_Document Document
func (x *Document) ProtoReflect() protoreflect.Message {
return (*fastReflection_Document)(x)
}
func (x *Document) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Document_messageType fastReflection_Document_messageType
var _ protoreflect.MessageType = fastReflection_Document_messageType{}
type fastReflection_Document_messageType struct{}
func (x fastReflection_Document_messageType) Zero() protoreflect.Message {
return (*fastReflection_Document)(nil)
}
func (x fastReflection_Document_messageType) New() protoreflect.Message {
return new(fastReflection_Document)
}
func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Document
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor {
return md_Document
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Document) Type() protoreflect.MessageType {
return _fastReflection_Document_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Document) New() protoreflect.Message {
return new(fastReflection_Document)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage {
return (*Document)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Id != "" {
value := protoreflect.ValueOfString(x.Id)
if !f(fd_Document_id, value) {
return
}
}
if x.Controller != "" {
value := protoreflect.ValueOfString(x.Controller)
if !f(fd_Document_controller, value) {
return
}
}
if len(x.Authentication) != 0 {
value := protoreflect.ValueOfList(&_Document_3_list{list: &x.Authentication})
if !f(fd_Document_authentication, value) {
return
}
}
if len(x.AssertionMethod) != 0 {
value := protoreflect.ValueOfList(&_Document_4_list{list: &x.AssertionMethod})
if !f(fd_Document_assertion_method, value) {
return
}
}
if len(x.CapabilityDelegation) != 0 {
value := protoreflect.ValueOfList(&_Document_5_list{list: &x.CapabilityDelegation})
if !f(fd_Document_capability_delegation, value) {
return
}
}
if len(x.CapabilityInvocation) != 0 {
value := protoreflect.ValueOfList(&_Document_6_list{list: &x.CapabilityInvocation})
if !f(fd_Document_capability_invocation, value) {
return
}
}
if len(x.Service) != 0 {
value := protoreflect.ValueOfList(&_Document_7_list{list: &x.Service})
if !f(fd_Document_service, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Document.id":
return x.Id != ""
case "did.v1.Document.controller":
return x.Controller != ""
case "did.v1.Document.authentication":
return len(x.Authentication) != 0
case "did.v1.Document.assertion_method":
return len(x.AssertionMethod) != 0
case "did.v1.Document.capability_delegation":
return len(x.CapabilityDelegation) != 0
case "did.v1.Document.capability_invocation":
return len(x.CapabilityInvocation) != 0
case "did.v1.Document.service":
return len(x.Service) != 0
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Document.id":
x.Id = ""
case "did.v1.Document.controller":
x.Controller = ""
case "did.v1.Document.authentication":
x.Authentication = nil
case "did.v1.Document.assertion_method":
x.AssertionMethod = nil
case "did.v1.Document.capability_delegation":
x.CapabilityDelegation = nil
case "did.v1.Document.capability_invocation":
x.CapabilityInvocation = nil
case "did.v1.Document.service":
x.Service = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Document.id":
value := x.Id
return protoreflect.ValueOfString(value)
case "did.v1.Document.controller":
value := x.Controller
return protoreflect.ValueOfString(value)
case "did.v1.Document.authentication":
if len(x.Authentication) == 0 {
return protoreflect.ValueOfList(&_Document_3_list{})
}
listValue := &_Document_3_list{list: &x.Authentication}
return protoreflect.ValueOfList(listValue)
case "did.v1.Document.assertion_method":
if len(x.AssertionMethod) == 0 {
return protoreflect.ValueOfList(&_Document_4_list{})
}
listValue := &_Document_4_list{list: &x.AssertionMethod}
return protoreflect.ValueOfList(listValue)
case "did.v1.Document.capability_delegation":
if len(x.CapabilityDelegation) == 0 {
return protoreflect.ValueOfList(&_Document_5_list{})
}
listValue := &_Document_5_list{list: &x.CapabilityDelegation}
return protoreflect.ValueOfList(listValue)
case "did.v1.Document.capability_invocation":
if len(x.CapabilityInvocation) == 0 {
return protoreflect.ValueOfList(&_Document_6_list{})
}
listValue := &_Document_6_list{list: &x.CapabilityInvocation}
return protoreflect.ValueOfList(listValue)
case "did.v1.Document.service":
if len(x.Service) == 0 {
return protoreflect.ValueOfList(&_Document_7_list{})
}
listValue := &_Document_7_list{list: &x.Service}
return protoreflect.ValueOfList(listValue)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Document.id":
x.Id = value.Interface().(string)
case "did.v1.Document.controller":
x.Controller = value.Interface().(string)
case "did.v1.Document.authentication":
lv := value.List()
clv := lv.(*_Document_3_list)
x.Authentication = *clv.list
case "did.v1.Document.assertion_method":
lv := value.List()
clv := lv.(*_Document_4_list)
x.AssertionMethod = *clv.list
case "did.v1.Document.capability_delegation":
lv := value.List()
clv := lv.(*_Document_5_list)
x.CapabilityDelegation = *clv.list
case "did.v1.Document.capability_invocation":
lv := value.List()
clv := lv.(*_Document_6_list)
x.CapabilityInvocation = *clv.list
case "did.v1.Document.service":
lv := value.List()
clv := lv.(*_Document_7_list)
x.Service = *clv.list
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Document.authentication":
if x.Authentication == nil {
x.Authentication = []string{}
}
value := &_Document_3_list{list: &x.Authentication}
return protoreflect.ValueOfList(value)
case "did.v1.Document.assertion_method":
if x.AssertionMethod == nil {
x.AssertionMethod = []string{}
}
value := &_Document_4_list{list: &x.AssertionMethod}
return protoreflect.ValueOfList(value)
case "did.v1.Document.capability_delegation":
if x.CapabilityDelegation == nil {
x.CapabilityDelegation = []string{}
}
value := &_Document_5_list{list: &x.CapabilityDelegation}
return protoreflect.ValueOfList(value)
case "did.v1.Document.capability_invocation":
if x.CapabilityInvocation == nil {
x.CapabilityInvocation = []string{}
}
value := &_Document_6_list{list: &x.CapabilityInvocation}
return protoreflect.ValueOfList(value)
case "did.v1.Document.service":
if x.Service == nil {
x.Service = []string{}
}
value := &_Document_7_list{list: &x.Service}
return protoreflect.ValueOfList(value)
case "did.v1.Document.id":
panic(fmt.Errorf("field id of message did.v1.Document is not mutable"))
case "did.v1.Document.controller":
panic(fmt.Errorf("field controller of message did.v1.Document is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Document.id":
return protoreflect.ValueOfString("")
case "did.v1.Document.controller":
return protoreflect.ValueOfString("")
case "did.v1.Document.authentication":
list := []string{}
return protoreflect.ValueOfList(&_Document_3_list{list: &list})
case "did.v1.Document.assertion_method":
list := []string{}
return protoreflect.ValueOfList(&_Document_4_list{list: &list})
case "did.v1.Document.capability_delegation":
list := []string{}
return protoreflect.ValueOfList(&_Document_5_list{list: &list})
case "did.v1.Document.capability_invocation":
list := []string{}
return protoreflect.ValueOfList(&_Document_6_list{list: &list})
case "did.v1.Document.service":
list := []string{}
return protoreflect.ValueOfList(&_Document_7_list{list: &list})
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
}
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Document) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Document)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
l = len(x.Id)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Controller)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if len(x.Authentication) > 0 {
for _, s := range x.Authentication {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if len(x.AssertionMethod) > 0 {
for _, s := range x.AssertionMethod {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if len(x.CapabilityDelegation) > 0 {
for _, s := range x.CapabilityDelegation {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if len(x.CapabilityInvocation) > 0 {
for _, s := range x.CapabilityInvocation {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if len(x.Service) > 0 {
for _, s := range x.Service {
l = len(s)
n += 1 + l + runtime.Sov(uint64(l))
}
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Document)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.Service) > 0 {
for iNdEx := len(x.Service) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.Service[iNdEx])
copy(dAtA[i:], x.Service[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Service[iNdEx])))
i--
dAtA[i] = 0x3a
}
}
if len(x.CapabilityInvocation) > 0 {
for iNdEx := len(x.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.CapabilityInvocation[iNdEx])
copy(dAtA[i:], x.CapabilityInvocation[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityInvocation[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if len(x.CapabilityDelegation) > 0 {
for iNdEx := len(x.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.CapabilityDelegation[iNdEx])
copy(dAtA[i:], x.CapabilityDelegation[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx])))
i--
dAtA[i] = 0x2a
}
}
if len(x.AssertionMethod) > 0 {
for iNdEx := len(x.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.AssertionMethod[iNdEx])
copy(dAtA[i:], x.AssertionMethod[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionMethod[iNdEx])))
i--
dAtA[i] = 0x22
}
}
if len(x.Authentication) > 0 {
for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- {
i -= len(x.Authentication[iNdEx])
copy(dAtA[i:], x.Authentication[iNdEx])
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authentication[iNdEx])))
i--
dAtA[i] = 0x1a
}
}
if len(x.Controller) > 0 {
i -= len(x.Controller)
copy(dAtA[i:], x.Controller)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
i--
dAtA[i] = 0x12
}
if len(x.Id) > 0 {
i -= len(x.Id)
copy(dAtA[i:], x.Id)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Document)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Authentication = append(x.Authentication, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.AssertionMethod = append(x.AssertionMethod, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 5:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.CapabilityDelegation = append(x.CapabilityDelegation, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.CapabilityInvocation = append(x.CapabilityInvocation, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 7:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Service = append(x.Service, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var _ protoreflect.Map = (*_Keyshare_1_map)(nil)
type _Keyshare_1_map struct {
m *map[string]string
}
func (x *_Keyshare_1_map) Len() int {
if x.m == nil {
return 0
}
return len(*x.m)
}
func (x *_Keyshare_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {
if x.m == nil {
return
}
for k, v := range *x.m {
mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k))
mapValue := protoreflect.ValueOfString(v)
if !f(mapKey, mapValue) {
break
}
}
}
func (x *_Keyshare_1_map) Has(key protoreflect.MapKey) bool {
if x.m == nil {
return false
}
keyUnwrapped := key.String()
concreteValue := keyUnwrapped
_, ok := (*x.m)[concreteValue]
return ok
}
func (x *_Keyshare_1_map) Clear(key protoreflect.MapKey) {
if x.m == nil {
return
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
delete(*x.m, concreteKey)
}
func (x *_Keyshare_1_map) Get(key protoreflect.MapKey) protoreflect.Value {
if x.m == nil {
return protoreflect.Value{}
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
v, ok := (*x.m)[concreteKey]
if !ok {
return protoreflect.Value{}
}
return protoreflect.ValueOfString(v)
}
func (x *_Keyshare_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) {
if !key.IsValid() || !value.IsValid() {
panic("invalid key or value provided")
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.m)[concreteKey] = concreteValue
}
func (x *_Keyshare_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value {
panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message")
}
func (x *_Keyshare_1_map) NewValue() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Keyshare_1_map) IsValid() bool {
return x.m != nil
}
var _ protoreflect.Map = (*_Keyshare_2_map)(nil)
type _Keyshare_2_map struct {
m *map[string][]byte
}
func (x *_Keyshare_2_map) Len() int {
if x.m == nil {
return 0
}
return len(*x.m)
}
func (x *_Keyshare_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {
if x.m == nil {
return
}
for k, v := range *x.m {
mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k))
mapValue := protoreflect.ValueOfBytes(v)
if !f(mapKey, mapValue) {
break
}
}
}
func (x *_Keyshare_2_map) Has(key protoreflect.MapKey) bool {
if x.m == nil {
return false
}
keyUnwrapped := key.String()
concreteValue := keyUnwrapped
_, ok := (*x.m)[concreteValue]
return ok
}
func (x *_Keyshare_2_map) Clear(key protoreflect.MapKey) {
if x.m == nil {
return
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
delete(*x.m, concreteKey)
}
func (x *_Keyshare_2_map) Get(key protoreflect.MapKey) protoreflect.Value {
if x.m == nil {
return protoreflect.Value{}
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
v, ok := (*x.m)[concreteKey]
if !ok {
return protoreflect.Value{}
}
return protoreflect.ValueOfBytes(v)
}
func (x *_Keyshare_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) {
if !key.IsValid() || !value.IsValid() {
panic("invalid key or value provided")
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
valueUnwrapped := value.Bytes()
concreteValue := valueUnwrapped
(*x.m)[concreteKey] = concreteValue
}
func (x *_Keyshare_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value {
panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message")
}
func (x *_Keyshare_2_map) NewValue() protoreflect.Value {
var v []byte
return protoreflect.ValueOfBytes(v)
}
func (x *_Keyshare_2_map) IsValid() bool {
return x.m != nil
}
var (
md_Keyshare protoreflect.MessageDescriptor
fd_Keyshare_metadata protoreflect.FieldDescriptor
fd_Keyshare_payloads protoreflect.FieldDescriptor
fd_Keyshare_protocol protoreflect.FieldDescriptor
fd_Keyshare_public_key protoreflect.FieldDescriptor
fd_Keyshare_version protoreflect.FieldDescriptor
fd_Keyshare_role protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Keyshare = File_did_v1_models_proto.Messages().ByName("Keyshare")
fd_Keyshare_metadata = md_Keyshare.Fields().ByName("metadata")
fd_Keyshare_payloads = md_Keyshare.Fields().ByName("payloads")
fd_Keyshare_protocol = md_Keyshare.Fields().ByName("protocol")
fd_Keyshare_public_key = md_Keyshare.Fields().ByName("public_key")
fd_Keyshare_version = md_Keyshare.Fields().ByName("version")
fd_Keyshare_role = md_Keyshare.Fields().ByName("role")
}
var _ protoreflect.Message = (*fastReflection_Keyshare)(nil)
type fastReflection_Keyshare Keyshare
func (x *Keyshare) ProtoReflect() protoreflect.Message {
return (*fastReflection_Keyshare)(x)
}
func (x *Keyshare) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Keyshare_messageType fastReflection_Keyshare_messageType
var _ protoreflect.MessageType = fastReflection_Keyshare_messageType{}
type fastReflection_Keyshare_messageType struct{}
func (x fastReflection_Keyshare_messageType) Zero() protoreflect.Message {
return (*fastReflection_Keyshare)(nil)
}
func (x fastReflection_Keyshare_messageType) New() protoreflect.Message {
return new(fastReflection_Keyshare)
}
func (x fastReflection_Keyshare_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Keyshare
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Keyshare) Descriptor() protoreflect.MessageDescriptor {
return md_Keyshare
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Keyshare) Type() protoreflect.MessageType {
return _fastReflection_Keyshare_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Keyshare) New() protoreflect.Message {
return new(fastReflection_Keyshare)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Keyshare) Interface() protoreflect.ProtoMessage {
return (*Keyshare)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Keyshare) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if len(x.Metadata) != 0 {
value := protoreflect.ValueOfMap(&_Keyshare_1_map{m: &x.Metadata})
if !f(fd_Keyshare_metadata, value) {
return
}
}
if len(x.Payloads) != 0 {
value := protoreflect.ValueOfMap(&_Keyshare_2_map{m: &x.Payloads})
if !f(fd_Keyshare_payloads, value) {
return
}
}
if x.Protocol != "" {
value := protoreflect.ValueOfString(x.Protocol)
if !f(fd_Keyshare_protocol, value) {
return
}
}
if len(x.PublicKey) != 0 {
value := protoreflect.ValueOfBytes(x.PublicKey)
if !f(fd_Keyshare_public_key, value) {
return
}
}
if x.Version != uint32(0) {
value := protoreflect.ValueOfUint32(x.Version)
if !f(fd_Keyshare_version, value) {
return
}
}
if x.Role != int32(0) {
value := protoreflect.ValueOfInt32(x.Role)
if !f(fd_Keyshare_role, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Keyshare) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Keyshare.metadata":
return len(x.Metadata) != 0
case "did.v1.Keyshare.payloads":
return len(x.Payloads) != 0
case "did.v1.Keyshare.protocol":
return x.Protocol != ""
case "did.v1.Keyshare.public_key":
return len(x.PublicKey) != 0
case "did.v1.Keyshare.version":
return x.Version != uint32(0)
case "did.v1.Keyshare.role":
return x.Role != int32(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Keyshare) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Keyshare.metadata":
x.Metadata = nil
case "did.v1.Keyshare.payloads":
x.Payloads = nil
case "did.v1.Keyshare.protocol":
x.Protocol = ""
case "did.v1.Keyshare.public_key":
x.PublicKey = nil
case "did.v1.Keyshare.version":
x.Version = uint32(0)
case "did.v1.Keyshare.role":
x.Role = int32(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Keyshare) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Keyshare.metadata":
if len(x.Metadata) == 0 {
return protoreflect.ValueOfMap(&_Keyshare_1_map{})
}
mapValue := &_Keyshare_1_map{m: &x.Metadata}
return protoreflect.ValueOfMap(mapValue)
case "did.v1.Keyshare.payloads":
if len(x.Payloads) == 0 {
return protoreflect.ValueOfMap(&_Keyshare_2_map{})
}
mapValue := &_Keyshare_2_map{m: &x.Payloads}
return protoreflect.ValueOfMap(mapValue)
case "did.v1.Keyshare.protocol":
value := x.Protocol
return protoreflect.ValueOfString(value)
case "did.v1.Keyshare.public_key":
value := x.PublicKey
return protoreflect.ValueOfBytes(value)
case "did.v1.Keyshare.version":
value := x.Version
return protoreflect.ValueOfUint32(value)
case "did.v1.Keyshare.role":
value := x.Role
return protoreflect.ValueOfInt32(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Keyshare) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Keyshare.metadata":
mv := value.Map()
cmv := mv.(*_Keyshare_1_map)
x.Metadata = *cmv.m
case "did.v1.Keyshare.payloads":
mv := value.Map()
cmv := mv.(*_Keyshare_2_map)
x.Payloads = *cmv.m
case "did.v1.Keyshare.protocol":
x.Protocol = value.Interface().(string)
case "did.v1.Keyshare.public_key":
x.PublicKey = value.Bytes()
case "did.v1.Keyshare.version":
x.Version = uint32(value.Uint())
case "did.v1.Keyshare.role":
x.Role = int32(value.Int())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Keyshare) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Keyshare.metadata":
if x.Metadata == nil {
x.Metadata = make(map[string]string)
}
value := &_Keyshare_1_map{m: &x.Metadata}
return protoreflect.ValueOfMap(value)
case "did.v1.Keyshare.payloads":
if x.Payloads == nil {
x.Payloads = make(map[string][]byte)
}
value := &_Keyshare_2_map{m: &x.Payloads}
return protoreflect.ValueOfMap(value)
case "did.v1.Keyshare.protocol":
panic(fmt.Errorf("field protocol of message did.v1.Keyshare is not mutable"))
case "did.v1.Keyshare.public_key":
panic(fmt.Errorf("field public_key of message did.v1.Keyshare is not mutable"))
case "did.v1.Keyshare.version":
panic(fmt.Errorf("field version of message did.v1.Keyshare is not mutable"))
case "did.v1.Keyshare.role":
panic(fmt.Errorf("field role of message did.v1.Keyshare is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Keyshare) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Keyshare.metadata":
m := make(map[string]string)
return protoreflect.ValueOfMap(&_Keyshare_1_map{m: &m})
case "did.v1.Keyshare.payloads":
m := make(map[string][]byte)
return protoreflect.ValueOfMap(&_Keyshare_2_map{m: &m})
case "did.v1.Keyshare.protocol":
return protoreflect.ValueOfString("")
case "did.v1.Keyshare.public_key":
return protoreflect.ValueOfBytes(nil)
case "did.v1.Keyshare.version":
return protoreflect.ValueOfUint32(uint32(0))
case "did.v1.Keyshare.role":
return protoreflect.ValueOfInt32(int32(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Keyshare"))
}
panic(fmt.Errorf("message did.v1.Keyshare does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Keyshare) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Keyshare", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Keyshare) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Keyshare) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Keyshare) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Keyshare) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Keyshare)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if len(x.Metadata) > 0 {
SiZeMaP := func(k string, v string) {
mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v)))
n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize))
}
if options.Deterministic {
sortme := make([]string, 0, len(x.Metadata))
for k := range x.Metadata {
sortme = append(sortme, k)
}
sort.Strings(sortme)
for _, k := range sortme {
v := x.Metadata[k]
SiZeMaP(k, v)
}
} else {
for k, v := range x.Metadata {
SiZeMaP(k, v)
}
}
}
if len(x.Payloads) > 0 {
SiZeMaP := func(k string, v []byte) {
l = 1 + len(v) + runtime.Sov(uint64(len(v)))
mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l
n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize))
}
if options.Deterministic {
sortme := make([]string, 0, len(x.Payloads))
for k := range x.Payloads {
sortme = append(sortme, k)
}
sort.Strings(sortme)
for _, k := range sortme {
v := x.Payloads[k]
SiZeMaP(k, v)
}
} else {
for k, v := range x.Payloads {
SiZeMaP(k, v)
}
}
}
l = len(x.Protocol)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.PublicKey)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Version != 0 {
n += 1 + runtime.Sov(uint64(x.Version))
}
if x.Role != 0 {
n += 1 + runtime.Sov(uint64(x.Role))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Keyshare)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Role != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Role))
i--
dAtA[i] = 0x30
}
if x.Version != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Version))
i--
dAtA[i] = 0x28
}
if len(x.PublicKey) > 0 {
i -= len(x.PublicKey)
copy(dAtA[i:], x.PublicKey)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey)))
i--
dAtA[i] = 0x22
}
if len(x.Protocol) > 0 {
i -= len(x.Protocol)
copy(dAtA[i:], x.Protocol)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Protocol)))
i--
dAtA[i] = 0x1a
}
if len(x.Payloads) > 0 {
MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) {
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = runtime.EncodeVarint(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = runtime.EncodeVarint(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x12
return protoiface.MarshalOutput{}, nil
}
if options.Deterministic {
keysForPayloads := make([]string, 0, len(x.Payloads))
for k := range x.Payloads {
keysForPayloads = append(keysForPayloads, string(k))
}
sort.Slice(keysForPayloads, func(i, j int) bool {
return keysForPayloads[i] < keysForPayloads[j]
})
for iNdEx := len(keysForPayloads) - 1; iNdEx >= 0; iNdEx-- {
v := x.Payloads[string(keysForPayloads[iNdEx])]
out, err := MaRsHaLmAp(keysForPayloads[iNdEx], v)
if err != nil {
return out, err
}
}
} else {
for k := range x.Payloads {
v := x.Payloads[k]
out, err := MaRsHaLmAp(k, v)
if err != nil {
return out, err
}
}
}
}
if len(x.Metadata) > 0 {
MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) {
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = runtime.EncodeVarint(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = runtime.EncodeVarint(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
return protoiface.MarshalOutput{}, nil
}
if options.Deterministic {
keysForMetadata := make([]string, 0, len(x.Metadata))
for k := range x.Metadata {
keysForMetadata = append(keysForMetadata, string(k))
}
sort.Slice(keysForMetadata, func(i, j int) bool {
return keysForMetadata[i] < keysForMetadata[j]
})
for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- {
v := x.Metadata[string(keysForMetadata[iNdEx])]
out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v)
if err != nil {
return out, err
}
}
} else {
for k := range x.Metadata {
v := x.Metadata[k]
out, err := MaRsHaLmAp(k, v)
if err != nil {
return out, err
}
}
}
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Keyshare)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshare: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Keyshare: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Metadata == nil {
x.Metadata = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postStringIndexmapkey > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postStringIndexmapvalue > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > postIndex {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
x.Metadata[mapkey] = mapvalue
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payloads", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Payloads == nil {
x.Payloads = make(map[string][]byte)
}
var mapkey string
var mapvalue []byte
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postStringIndexmapkey > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var mapbyteLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapbyteLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intMapbyteLen := int(mapbyteLen)
if intMapbyteLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postbytesIndex := iNdEx + intMapbyteLen
if postbytesIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postbytesIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapvalue = make([]byte, mapbyteLen)
copy(mapvalue, dAtA[iNdEx:postbytesIndex])
iNdEx = postbytesIndex
} else {
iNdEx = entryPreIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > postIndex {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
x.Payloads[mapkey] = mapvalue
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Protocol = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.PublicKey = append(x.PublicKey[:0], dAtA[iNdEx:postIndex]...)
if x.PublicKey == nil {
x.PublicKey = []byte{}
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
}
x.Version = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Version |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
x.Role = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Role |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var _ protoreflect.List = (*_Permissions_1_list)(nil)
type _Permissions_1_list struct {
list *[]DIDNamespace
}
func (x *_Permissions_1_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Permissions_1_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i]))
}
func (x *_Permissions_1_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.Enum()
concreteValue := (DIDNamespace)(valueUnwrapped)
(*x.list)[i] = concreteValue
}
func (x *_Permissions_1_list) Append(value protoreflect.Value) {
valueUnwrapped := value.Enum()
concreteValue := (DIDNamespace)(valueUnwrapped)
*x.list = append(*x.list, concreteValue)
}
func (x *_Permissions_1_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Grants as it is not of Message kind"))
}
func (x *_Permissions_1_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Permissions_1_list) NewElement() protoreflect.Value {
v := 0
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v))
}
func (x *_Permissions_1_list) IsValid() bool {
return x.list != nil
}
var _ protoreflect.List = (*_Permissions_2_list)(nil)
type _Permissions_2_list struct {
list *[]PermissionScope
}
func (x *_Permissions_2_list) Len() int {
if x.list == nil {
return 0
}
return len(*x.list)
}
func (x *_Permissions_2_list) Get(i int) protoreflect.Value {
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i]))
}
func (x *_Permissions_2_list) Set(i int, value protoreflect.Value) {
valueUnwrapped := value.Enum()
concreteValue := (PermissionScope)(valueUnwrapped)
(*x.list)[i] = concreteValue
}
func (x *_Permissions_2_list) Append(value protoreflect.Value) {
valueUnwrapped := value.Enum()
concreteValue := (PermissionScope)(valueUnwrapped)
*x.list = append(*x.list, concreteValue)
}
func (x *_Permissions_2_list) AppendMutable() protoreflect.Value {
panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Scopes as it is not of Message kind"))
}
func (x *_Permissions_2_list) Truncate(n int) {
*x.list = (*x.list)[:n]
}
func (x *_Permissions_2_list) NewElement() protoreflect.Value {
v := 0
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v))
}
func (x *_Permissions_2_list) IsValid() bool {
return x.list != nil
}
var (
md_Permissions protoreflect.MessageDescriptor
fd_Permissions_grants protoreflect.FieldDescriptor
fd_Permissions_scopes protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Permissions = File_did_v1_models_proto.Messages().ByName("Permissions")
fd_Permissions_grants = md_Permissions.Fields().ByName("grants")
fd_Permissions_scopes = md_Permissions.Fields().ByName("scopes")
}
var _ protoreflect.Message = (*fastReflection_Permissions)(nil)
type fastReflection_Permissions Permissions
func (x *Permissions) ProtoReflect() protoreflect.Message {
return (*fastReflection_Permissions)(x)
}
func (x *Permissions) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Permissions_messageType fastReflection_Permissions_messageType
var _ protoreflect.MessageType = fastReflection_Permissions_messageType{}
type fastReflection_Permissions_messageType struct{}
func (x fastReflection_Permissions_messageType) Zero() protoreflect.Message {
return (*fastReflection_Permissions)(nil)
}
func (x fastReflection_Permissions_messageType) New() protoreflect.Message {
return new(fastReflection_Permissions)
}
func (x fastReflection_Permissions_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Permissions
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Permissions) Descriptor() protoreflect.MessageDescriptor {
return md_Permissions
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Permissions) Type() protoreflect.MessageType {
return _fastReflection_Permissions_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Permissions) New() protoreflect.Message {
return new(fastReflection_Permissions)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Permissions) Interface() protoreflect.ProtoMessage {
return (*Permissions)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Permissions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if len(x.Grants) != 0 {
value := protoreflect.ValueOfList(&_Permissions_1_list{list: &x.Grants})
if !f(fd_Permissions_grants, value) {
return
}
}
if len(x.Scopes) != 0 {
value := protoreflect.ValueOfList(&_Permissions_2_list{list: &x.Scopes})
if !f(fd_Permissions_scopes, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Permissions) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Permissions.grants":
return len(x.Grants) != 0
case "did.v1.Permissions.scopes":
return len(x.Scopes) != 0
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Permissions) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Permissions.grants":
x.Grants = nil
case "did.v1.Permissions.scopes":
x.Scopes = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Permissions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Permissions.grants":
if len(x.Grants) == 0 {
return protoreflect.ValueOfList(&_Permissions_1_list{})
}
listValue := &_Permissions_1_list{list: &x.Grants}
return protoreflect.ValueOfList(listValue)
case "did.v1.Permissions.scopes":
if len(x.Scopes) == 0 {
return protoreflect.ValueOfList(&_Permissions_2_list{})
}
listValue := &_Permissions_2_list{list: &x.Scopes}
return protoreflect.ValueOfList(listValue)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Permissions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Permissions.grants":
lv := value.List()
clv := lv.(*_Permissions_1_list)
x.Grants = *clv.list
case "did.v1.Permissions.scopes":
lv := value.List()
clv := lv.(*_Permissions_2_list)
x.Scopes = *clv.list
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Permissions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Permissions.grants":
if x.Grants == nil {
x.Grants = []DIDNamespace{}
}
value := &_Permissions_1_list{list: &x.Grants}
return protoreflect.ValueOfList(value)
case "did.v1.Permissions.scopes":
if x.Scopes == nil {
x.Scopes = []PermissionScope{}
}
value := &_Permissions_2_list{list: &x.Scopes}
return protoreflect.ValueOfList(value)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Permissions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Permissions.grants":
list := []DIDNamespace{}
return protoreflect.ValueOfList(&_Permissions_1_list{list: &list})
case "did.v1.Permissions.scopes":
list := []PermissionScope{}
return protoreflect.ValueOfList(&_Permissions_2_list{list: &list})
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
}
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Permissions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Permissions", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Permissions) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Permissions) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Permissions) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Permissions) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Permissions)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if len(x.Grants) > 0 {
l = 0
for _, e := range x.Grants {
l += runtime.Sov(uint64(e))
}
n += 1 + runtime.Sov(uint64(l)) + l
}
if len(x.Scopes) > 0 {
l = 0
for _, e := range x.Scopes {
l += runtime.Sov(uint64(e))
}
n += 1 + runtime.Sov(uint64(l)) + l
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Permissions)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.Scopes) > 0 {
var pksize2 int
for _, num := range x.Scopes {
pksize2 += runtime.Sov(uint64(num))
}
i -= pksize2
j1 := i
for _, num1 := range x.Scopes {
num := uint64(num1)
for num >= 1<<7 {
dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j1++
}
dAtA[j1] = uint8(num)
j1++
}
i = runtime.EncodeVarint(dAtA, i, uint64(pksize2))
i--
dAtA[i] = 0x12
}
if len(x.Grants) > 0 {
var pksize4 int
for _, num := range x.Grants {
pksize4 += runtime.Sov(uint64(num))
}
i -= pksize4
j3 := i
for _, num1 := range x.Grants {
num := uint64(num1)
for num >= 1<<7 {
dAtA[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j3++
}
dAtA[j3] = uint8(num)
j3++
}
i = runtime.EncodeVarint(dAtA, i, uint64(pksize4))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Permissions)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType == 0 {
var v DIDNamespace
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= DIDNamespace(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Grants = append(x.Grants, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
var elementCount int
if elementCount != 0 && len(x.Grants) == 0 {
x.Grants = make([]DIDNamespace, 0, elementCount)
}
for iNdEx < postIndex {
var v DIDNamespace
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= DIDNamespace(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Grants = append(x.Grants, v)
}
} else {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
}
case 2:
if wireType == 0 {
var v PermissionScope
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= PermissionScope(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Scopes = append(x.Scopes, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
var elementCount int
if elementCount != 0 && len(x.Scopes) == 0 {
x.Scopes = make([]PermissionScope, 0, elementCount)
}
for iNdEx < postIndex {
var v PermissionScope
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= PermissionScope(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Scopes = append(x.Scopes, v)
}
} else {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_PubKey protoreflect.MessageDescriptor
fd_PubKey_role protoreflect.FieldDescriptor
fd_PubKey_algorithm protoreflect.FieldDescriptor
fd_PubKey_encoding protoreflect.FieldDescriptor
fd_PubKey_curve protoreflect.FieldDescriptor
fd_PubKey_key_type protoreflect.FieldDescriptor
fd_PubKey_raw protoreflect.FieldDescriptor
fd_PubKey_jwk protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_PubKey = File_did_v1_models_proto.Messages().ByName("PubKey")
fd_PubKey_role = md_PubKey.Fields().ByName("role")
fd_PubKey_algorithm = md_PubKey.Fields().ByName("algorithm")
fd_PubKey_encoding = md_PubKey.Fields().ByName("encoding")
fd_PubKey_curve = md_PubKey.Fields().ByName("curve")
fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type")
fd_PubKey_raw = md_PubKey.Fields().ByName("raw")
fd_PubKey_jwk = md_PubKey.Fields().ByName("jwk")
}
var _ protoreflect.Message = (*fastReflection_PubKey)(nil)
type fastReflection_PubKey PubKey
func (x *PubKey) ProtoReflect() protoreflect.Message {
return (*fastReflection_PubKey)(x)
}
func (x *PubKey) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType
var _ protoreflect.MessageType = fastReflection_PubKey_messageType{}
type fastReflection_PubKey_messageType struct{}
func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message {
return (*fastReflection_PubKey)(nil)
}
func (x fastReflection_PubKey_messageType) New() protoreflect.Message {
return new(fastReflection_PubKey)
}
func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_PubKey
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor {
return md_PubKey
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_PubKey) Type() protoreflect.MessageType {
return _fastReflection_PubKey_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_PubKey) New() protoreflect.Message {
return new(fastReflection_PubKey)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage {
return (*PubKey)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Role != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role))
if !f(fd_PubKey_role, value) {
return
}
}
if x.Algorithm != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm))
if !f(fd_PubKey_algorithm, value) {
return
}
}
if x.Encoding != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding))
if !f(fd_PubKey_encoding, value) {
return
}
}
if x.Curve != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Curve))
if !f(fd_PubKey_curve, value) {
return
}
}
if x.KeyType != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.KeyType))
if !f(fd_PubKey_key_type, value) {
return
}
}
if len(x.Raw) != 0 {
value := protoreflect.ValueOfBytes(x.Raw)
if !f(fd_PubKey_raw, value) {
return
}
}
if x.Jwk != nil {
value := protoreflect.ValueOfMessage(x.Jwk.ProtoReflect())
if !f(fd_PubKey_jwk, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.PubKey.role":
return x.Role != 0
case "did.v1.PubKey.algorithm":
return x.Algorithm != 0
case "did.v1.PubKey.encoding":
return x.Encoding != 0
case "did.v1.PubKey.curve":
return x.Curve != 0
case "did.v1.PubKey.key_type":
return x.KeyType != 0
case "did.v1.PubKey.raw":
return len(x.Raw) != 0
case "did.v1.PubKey.jwk":
return x.Jwk != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.PubKey.role":
x.Role = 0
case "did.v1.PubKey.algorithm":
x.Algorithm = 0
case "did.v1.PubKey.encoding":
x.Encoding = 0
case "did.v1.PubKey.curve":
x.Curve = 0
case "did.v1.PubKey.key_type":
x.KeyType = 0
case "did.v1.PubKey.raw":
x.Raw = nil
case "did.v1.PubKey.jwk":
x.Jwk = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.PubKey.role":
value := x.Role
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "did.v1.PubKey.algorithm":
value := x.Algorithm
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "did.v1.PubKey.encoding":
value := x.Encoding
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "did.v1.PubKey.curve":
value := x.Curve
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "did.v1.PubKey.key_type":
value := x.KeyType
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
case "did.v1.PubKey.raw":
value := x.Raw
return protoreflect.ValueOfBytes(value)
case "did.v1.PubKey.jwk":
value := x.Jwk
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.PubKey.role":
x.Role = (KeyRole)(value.Enum())
case "did.v1.PubKey.algorithm":
x.Algorithm = (KeyAlgorithm)(value.Enum())
case "did.v1.PubKey.encoding":
x.Encoding = (KeyEncoding)(value.Enum())
case "did.v1.PubKey.curve":
x.Curve = (KeyCurve)(value.Enum())
case "did.v1.PubKey.key_type":
x.KeyType = (KeyType)(value.Enum())
case "did.v1.PubKey.raw":
x.Raw = value.Bytes()
case "did.v1.PubKey.jwk":
x.Jwk = value.Message().Interface().(*PubKey_JWK)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.PubKey.jwk":
if x.Jwk == nil {
x.Jwk = new(PubKey_JWK)
}
return protoreflect.ValueOfMessage(x.Jwk.ProtoReflect())
case "did.v1.PubKey.role":
panic(fmt.Errorf("field role of message did.v1.PubKey is not mutable"))
case "did.v1.PubKey.algorithm":
panic(fmt.Errorf("field algorithm of message did.v1.PubKey is not mutable"))
case "did.v1.PubKey.encoding":
panic(fmt.Errorf("field encoding of message did.v1.PubKey is not mutable"))
case "did.v1.PubKey.curve":
panic(fmt.Errorf("field curve of message did.v1.PubKey is not mutable"))
case "did.v1.PubKey.key_type":
panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable"))
case "did.v1.PubKey.raw":
panic(fmt.Errorf("field raw of message did.v1.PubKey is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.PubKey.role":
return protoreflect.ValueOfEnum(0)
case "did.v1.PubKey.algorithm":
return protoreflect.ValueOfEnum(0)
case "did.v1.PubKey.encoding":
return protoreflect.ValueOfEnum(0)
case "did.v1.PubKey.curve":
return protoreflect.ValueOfEnum(0)
case "did.v1.PubKey.key_type":
return protoreflect.ValueOfEnum(0)
case "did.v1.PubKey.raw":
return protoreflect.ValueOfBytes(nil)
case "did.v1.PubKey.jwk":
m := new(PubKey_JWK)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
}
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_PubKey) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*PubKey)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.Role != 0 {
n += 1 + runtime.Sov(uint64(x.Role))
}
if x.Algorithm != 0 {
n += 1 + runtime.Sov(uint64(x.Algorithm))
}
if x.Encoding != 0 {
n += 1 + runtime.Sov(uint64(x.Encoding))
}
if x.Curve != 0 {
n += 1 + runtime.Sov(uint64(x.Curve))
}
if x.KeyType != 0 {
n += 1 + runtime.Sov(uint64(x.KeyType))
}
l = len(x.Raw)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Jwk != nil {
l = options.Size(x.Jwk)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*PubKey)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Jwk != nil {
encoded, err := options.Marshal(x.Jwk)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0x3a
}
if len(x.Raw) > 0 {
i -= len(x.Raw)
copy(dAtA[i:], x.Raw)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Raw)))
i--
dAtA[i] = 0x32
}
if x.KeyType != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.KeyType))
i--
dAtA[i] = 0x28
}
if x.Curve != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Curve))
i--
dAtA[i] = 0x20
}
if x.Encoding != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoding))
i--
dAtA[i] = 0x18
}
if x.Algorithm != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Algorithm))
i--
dAtA[i] = 0x10
}
if x.Role != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Role))
i--
dAtA[i] = 0x8
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*PubKey)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
x.Role = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Role |= KeyRole(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType)
}
x.Algorithm = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Algorithm |= KeyAlgorithm(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType)
}
x.Encoding = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Encoding |= KeyEncoding(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType)
}
x.Curve = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Curve |= KeyCurve(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType)
}
x.KeyType = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.KeyType |= KeyType(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Raw = append(x.Raw[:0], dAtA[iNdEx:postIndex]...)
if x.Raw == nil {
x.Raw = []byte{}
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Jwk == nil {
x.Jwk = &PubKey_JWK{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Jwk); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_PubKey_JWK protoreflect.MessageDescriptor
fd_PubKey_JWK_kty protoreflect.FieldDescriptor
fd_PubKey_JWK_crv protoreflect.FieldDescriptor
fd_PubKey_JWK_x protoreflect.FieldDescriptor
fd_PubKey_JWK_y protoreflect.FieldDescriptor
fd_PubKey_JWK_n protoreflect.FieldDescriptor
fd_PubKey_JWK_e protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_PubKey_JWK = File_did_v1_models_proto.Messages().ByName("PubKey").Messages().ByName("JWK")
fd_PubKey_JWK_kty = md_PubKey_JWK.Fields().ByName("kty")
fd_PubKey_JWK_crv = md_PubKey_JWK.Fields().ByName("crv")
fd_PubKey_JWK_x = md_PubKey_JWK.Fields().ByName("x")
fd_PubKey_JWK_y = md_PubKey_JWK.Fields().ByName("y")
fd_PubKey_JWK_n = md_PubKey_JWK.Fields().ByName("n")
fd_PubKey_JWK_e = md_PubKey_JWK.Fields().ByName("e")
}
var _ protoreflect.Message = (*fastReflection_PubKey_JWK)(nil)
type fastReflection_PubKey_JWK PubKey_JWK
func (x *PubKey_JWK) ProtoReflect() protoreflect.Message {
return (*fastReflection_PubKey_JWK)(x)
}
func (x *PubKey_JWK) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_PubKey_JWK_messageType fastReflection_PubKey_JWK_messageType
var _ protoreflect.MessageType = fastReflection_PubKey_JWK_messageType{}
type fastReflection_PubKey_JWK_messageType struct{}
func (x fastReflection_PubKey_JWK_messageType) Zero() protoreflect.Message {
return (*fastReflection_PubKey_JWK)(nil)
}
func (x fastReflection_PubKey_JWK_messageType) New() protoreflect.Message {
return new(fastReflection_PubKey_JWK)
}
func (x fastReflection_PubKey_JWK_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_PubKey_JWK
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_PubKey_JWK) Descriptor() protoreflect.MessageDescriptor {
return md_PubKey_JWK
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_PubKey_JWK) Type() protoreflect.MessageType {
return _fastReflection_PubKey_JWK_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_PubKey_JWK) New() protoreflect.Message {
return new(fastReflection_PubKey_JWK)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_PubKey_JWK) Interface() protoreflect.ProtoMessage {
return (*PubKey_JWK)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_PubKey_JWK) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Kty != "" {
value := protoreflect.ValueOfString(x.Kty)
if !f(fd_PubKey_JWK_kty, value) {
return
}
}
if x.Crv != "" {
value := protoreflect.ValueOfString(x.Crv)
if !f(fd_PubKey_JWK_crv, value) {
return
}
}
if x.X != "" {
value := protoreflect.ValueOfString(x.X)
if !f(fd_PubKey_JWK_x, value) {
return
}
}
if x.Y != "" {
value := protoreflect.ValueOfString(x.Y)
if !f(fd_PubKey_JWK_y, value) {
return
}
}
if x.N != "" {
value := protoreflect.ValueOfString(x.N)
if !f(fd_PubKey_JWK_n, value) {
return
}
}
if x.E != "" {
value := protoreflect.ValueOfString(x.E)
if !f(fd_PubKey_JWK_e, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_PubKey_JWK) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.PubKey.JWK.kty":
return x.Kty != ""
case "did.v1.PubKey.JWK.crv":
return x.Crv != ""
case "did.v1.PubKey.JWK.x":
return x.X != ""
case "did.v1.PubKey.JWK.y":
return x.Y != ""
case "did.v1.PubKey.JWK.n":
return x.N != ""
case "did.v1.PubKey.JWK.e":
return x.E != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey_JWK) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.PubKey.JWK.kty":
x.Kty = ""
case "did.v1.PubKey.JWK.crv":
x.Crv = ""
case "did.v1.PubKey.JWK.x":
x.X = ""
case "did.v1.PubKey.JWK.y":
x.Y = ""
case "did.v1.PubKey.JWK.n":
x.N = ""
case "did.v1.PubKey.JWK.e":
x.E = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_PubKey_JWK) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.PubKey.JWK.kty":
value := x.Kty
return protoreflect.ValueOfString(value)
case "did.v1.PubKey.JWK.crv":
value := x.Crv
return protoreflect.ValueOfString(value)
case "did.v1.PubKey.JWK.x":
value := x.X
return protoreflect.ValueOfString(value)
case "did.v1.PubKey.JWK.y":
value := x.Y
return protoreflect.ValueOfString(value)
case "did.v1.PubKey.JWK.n":
value := x.N
return protoreflect.ValueOfString(value)
case "did.v1.PubKey.JWK.e":
value := x.E
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey_JWK) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.PubKey.JWK.kty":
x.Kty = value.Interface().(string)
case "did.v1.PubKey.JWK.crv":
x.Crv = value.Interface().(string)
case "did.v1.PubKey.JWK.x":
x.X = value.Interface().(string)
case "did.v1.PubKey.JWK.y":
x.Y = value.Interface().(string)
case "did.v1.PubKey.JWK.n":
x.N = value.Interface().(string)
case "did.v1.PubKey.JWK.e":
x.E = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey_JWK) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.PubKey.JWK.kty":
panic(fmt.Errorf("field kty of message did.v1.PubKey.JWK is not mutable"))
case "did.v1.PubKey.JWK.crv":
panic(fmt.Errorf("field crv of message did.v1.PubKey.JWK is not mutable"))
case "did.v1.PubKey.JWK.x":
panic(fmt.Errorf("field x of message did.v1.PubKey.JWK is not mutable"))
case "did.v1.PubKey.JWK.y":
panic(fmt.Errorf("field y of message did.v1.PubKey.JWK is not mutable"))
case "did.v1.PubKey.JWK.n":
panic(fmt.Errorf("field n of message did.v1.PubKey.JWK is not mutable"))
case "did.v1.PubKey.JWK.e":
panic(fmt.Errorf("field e of message did.v1.PubKey.JWK is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_PubKey_JWK) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.PubKey.JWK.kty":
return protoreflect.ValueOfString("")
case "did.v1.PubKey.JWK.crv":
return protoreflect.ValueOfString("")
case "did.v1.PubKey.JWK.x":
return protoreflect.ValueOfString("")
case "did.v1.PubKey.JWK.y":
return protoreflect.ValueOfString("")
case "did.v1.PubKey.JWK.n":
return protoreflect.ValueOfString("")
case "did.v1.PubKey.JWK.e":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey.JWK"))
}
panic(fmt.Errorf("message did.v1.PubKey.JWK does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_PubKey_JWK) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey.JWK", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_PubKey_JWK) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_PubKey_JWK) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_PubKey_JWK) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_PubKey_JWK) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*PubKey_JWK)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
l = len(x.Kty)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Crv)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.X)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Y)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.N)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.E)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*PubKey_JWK)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.E) > 0 {
i -= len(x.E)
copy(dAtA[i:], x.E)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.E)))
i--
dAtA[i] = 0x32
}
if len(x.N) > 0 {
i -= len(x.N)
copy(dAtA[i:], x.N)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.N)))
i--
dAtA[i] = 0x2a
}
if len(x.Y) > 0 {
i -= len(x.Y)
copy(dAtA[i:], x.Y)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Y)))
i--
dAtA[i] = 0x22
}
if len(x.X) > 0 {
i -= len(x.X)
copy(dAtA[i:], x.X)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.X)))
i--
dAtA[i] = 0x1a
}
if len(x.Crv) > 0 {
i -= len(x.Crv)
copy(dAtA[i:], x.Crv)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Crv)))
i--
dAtA[i] = 0x12
}
if len(x.Kty) > 0 {
i -= len(x.Kty)
copy(dAtA[i:], x.Kty)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kty)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*PubKey_JWK)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey_JWK: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kty", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Kty = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Crv", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Crv = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field X", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.X = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Y", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Y = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field N", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.N = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field E", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.E = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var _ protoreflect.Map = (*_Service_6_map)(nil)
type _Service_6_map struct {
m *map[string]string
}
func (x *_Service_6_map) Len() int {
if x.m == nil {
return 0
}
return len(*x.m)
}
func (x *_Service_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {
if x.m == nil {
return
}
for k, v := range *x.m {
mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k))
mapValue := protoreflect.ValueOfString(v)
if !f(mapKey, mapValue) {
break
}
}
}
func (x *_Service_6_map) Has(key protoreflect.MapKey) bool {
if x.m == nil {
return false
}
keyUnwrapped := key.String()
concreteValue := keyUnwrapped
_, ok := (*x.m)[concreteValue]
return ok
}
func (x *_Service_6_map) Clear(key protoreflect.MapKey) {
if x.m == nil {
return
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
delete(*x.m, concreteKey)
}
func (x *_Service_6_map) Get(key protoreflect.MapKey) protoreflect.Value {
if x.m == nil {
return protoreflect.Value{}
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
v, ok := (*x.m)[concreteKey]
if !ok {
return protoreflect.Value{}
}
return protoreflect.ValueOfString(v)
}
func (x *_Service_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) {
if !key.IsValid() || !value.IsValid() {
panic("invalid key or value provided")
}
keyUnwrapped := key.String()
concreteKey := keyUnwrapped
valueUnwrapped := value.String()
concreteValue := valueUnwrapped
(*x.m)[concreteKey] = concreteValue
}
func (x *_Service_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value {
panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message")
}
func (x *_Service_6_map) NewValue() protoreflect.Value {
v := ""
return protoreflect.ValueOfString(v)
}
func (x *_Service_6_map) IsValid() bool {
return x.m != nil
}
var (
md_Service protoreflect.MessageDescriptor
fd_Service_id protoreflect.FieldDescriptor
fd_Service_service_type protoreflect.FieldDescriptor
fd_Service_authority protoreflect.FieldDescriptor
fd_Service_origin protoreflect.FieldDescriptor
fd_Service_description protoreflect.FieldDescriptor
fd_Service_service_endpoints protoreflect.FieldDescriptor
fd_Service_permissions protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_Service = File_did_v1_models_proto.Messages().ByName("Service")
fd_Service_id = md_Service.Fields().ByName("id")
fd_Service_service_type = md_Service.Fields().ByName("service_type")
fd_Service_authority = md_Service.Fields().ByName("authority")
fd_Service_origin = md_Service.Fields().ByName("origin")
fd_Service_description = md_Service.Fields().ByName("description")
fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints")
fd_Service_permissions = md_Service.Fields().ByName("permissions")
}
var _ protoreflect.Message = (*fastReflection_Service)(nil)
type fastReflection_Service Service
func (x *Service) ProtoReflect() protoreflect.Message {
return (*fastReflection_Service)(x)
}
func (x *Service) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Service_messageType fastReflection_Service_messageType
var _ protoreflect.MessageType = fastReflection_Service_messageType{}
type fastReflection_Service_messageType struct{}
func (x fastReflection_Service_messageType) Zero() protoreflect.Message {
return (*fastReflection_Service)(nil)
}
func (x fastReflection_Service_messageType) New() protoreflect.Message {
return new(fastReflection_Service)
}
func (x fastReflection_Service_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Service
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Service) Descriptor() protoreflect.MessageDescriptor {
return md_Service
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Service) Type() protoreflect.MessageType {
return _fastReflection_Service_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Service) New() protoreflect.Message {
return new(fastReflection_Service)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage {
return (*Service)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Id != "" {
value := protoreflect.ValueOfString(x.Id)
if !f(fd_Service_id, value) {
return
}
}
if x.ServiceType != "" {
value := protoreflect.ValueOfString(x.ServiceType)
if !f(fd_Service_service_type, value) {
return
}
}
if x.Authority != "" {
value := protoreflect.ValueOfString(x.Authority)
if !f(fd_Service_authority, value) {
return
}
}
if x.Origin != "" {
value := protoreflect.ValueOfString(x.Origin)
if !f(fd_Service_origin, value) {
return
}
}
if x.Description != "" {
value := protoreflect.ValueOfString(x.Description)
if !f(fd_Service_description, value) {
return
}
}
if len(x.ServiceEndpoints) != 0 {
value := protoreflect.ValueOfMap(&_Service_6_map{m: &x.ServiceEndpoints})
if !f(fd_Service_service_endpoints, value) {
return
}
}
if x.Permissions != nil {
value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect())
if !f(fd_Service_permissions, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.Service.id":
return x.Id != ""
case "did.v1.Service.service_type":
return x.ServiceType != ""
case "did.v1.Service.authority":
return x.Authority != ""
case "did.v1.Service.origin":
return x.Origin != ""
case "did.v1.Service.description":
return x.Description != ""
case "did.v1.Service.service_endpoints":
return len(x.ServiceEndpoints) != 0
case "did.v1.Service.permissions":
return x.Permissions != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.Service.id":
x.Id = ""
case "did.v1.Service.service_type":
x.ServiceType = ""
case "did.v1.Service.authority":
x.Authority = ""
case "did.v1.Service.origin":
x.Origin = ""
case "did.v1.Service.description":
x.Description = ""
case "did.v1.Service.service_endpoints":
x.ServiceEndpoints = nil
case "did.v1.Service.permissions":
x.Permissions = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.Service.id":
value := x.Id
return protoreflect.ValueOfString(value)
case "did.v1.Service.service_type":
value := x.ServiceType
return protoreflect.ValueOfString(value)
case "did.v1.Service.authority":
value := x.Authority
return protoreflect.ValueOfString(value)
case "did.v1.Service.origin":
value := x.Origin
return protoreflect.ValueOfString(value)
case "did.v1.Service.description":
value := x.Description
return protoreflect.ValueOfString(value)
case "did.v1.Service.service_endpoints":
if len(x.ServiceEndpoints) == 0 {
return protoreflect.ValueOfMap(&_Service_6_map{})
}
mapValue := &_Service_6_map{m: &x.ServiceEndpoints}
return protoreflect.ValueOfMap(mapValue)
case "did.v1.Service.permissions":
value := x.Permissions
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.Service.id":
x.Id = value.Interface().(string)
case "did.v1.Service.service_type":
x.ServiceType = value.Interface().(string)
case "did.v1.Service.authority":
x.Authority = value.Interface().(string)
case "did.v1.Service.origin":
x.Origin = value.Interface().(string)
case "did.v1.Service.description":
x.Description = value.Interface().(string)
case "did.v1.Service.service_endpoints":
mv := value.Map()
cmv := mv.(*_Service_6_map)
x.ServiceEndpoints = *cmv.m
case "did.v1.Service.permissions":
x.Permissions = value.Message().Interface().(*Permissions)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Service.service_endpoints":
if x.ServiceEndpoints == nil {
x.ServiceEndpoints = make(map[string]string)
}
value := &_Service_6_map{m: &x.ServiceEndpoints}
return protoreflect.ValueOfMap(value)
case "did.v1.Service.permissions":
if x.Permissions == nil {
x.Permissions = new(Permissions)
}
return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect())
case "did.v1.Service.id":
panic(fmt.Errorf("field id of message did.v1.Service is not mutable"))
case "did.v1.Service.service_type":
panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable"))
case "did.v1.Service.authority":
panic(fmt.Errorf("field authority of message did.v1.Service is not mutable"))
case "did.v1.Service.origin":
panic(fmt.Errorf("field origin of message did.v1.Service is not mutable"))
case "did.v1.Service.description":
panic(fmt.Errorf("field description of message did.v1.Service is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.Service.id":
return protoreflect.ValueOfString("")
case "did.v1.Service.service_type":
return protoreflect.ValueOfString("")
case "did.v1.Service.authority":
return protoreflect.ValueOfString("")
case "did.v1.Service.origin":
return protoreflect.ValueOfString("")
case "did.v1.Service.description":
return protoreflect.ValueOfString("")
case "did.v1.Service.service_endpoints":
m := make(map[string]string)
return protoreflect.ValueOfMap(&_Service_6_map{m: &m})
case "did.v1.Service.permissions":
m := new(Permissions)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
}
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Service) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.Service", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Service) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Service) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Service) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Service)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
l = len(x.Id)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.ServiceType)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Authority)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Origin)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Description)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if len(x.ServiceEndpoints) > 0 {
SiZeMaP := func(k string, v string) {
mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v)))
n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize))
}
if options.Deterministic {
sortme := make([]string, 0, len(x.ServiceEndpoints))
for k := range x.ServiceEndpoints {
sortme = append(sortme, k)
}
sort.Strings(sortme)
for _, k := range sortme {
v := x.ServiceEndpoints[k]
SiZeMaP(k, v)
}
} else {
for k, v := range x.ServiceEndpoints {
SiZeMaP(k, v)
}
}
}
if x.Permissions != nil {
l = options.Size(x.Permissions)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Service)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Permissions != nil {
encoded, err := options.Marshal(x.Permissions)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0x3a
}
if len(x.ServiceEndpoints) > 0 {
MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) {
baseI := i
i -= len(v)
copy(dAtA[i:], v)
i = runtime.EncodeVarint(dAtA, i, uint64(len(v)))
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = runtime.EncodeVarint(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0x32
return protoiface.MarshalOutput{}, nil
}
if options.Deterministic {
keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints))
for k := range x.ServiceEndpoints {
keysForServiceEndpoints = append(keysForServiceEndpoints, string(k))
}
sort.Slice(keysForServiceEndpoints, func(i, j int) bool {
return keysForServiceEndpoints[i] < keysForServiceEndpoints[j]
})
for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- {
v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])]
out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v)
if err != nil {
return out, err
}
}
} else {
for k := range x.ServiceEndpoints {
v := x.ServiceEndpoints[k]
out, err := MaRsHaLmAp(k, v)
if err != nil {
return out, err
}
}
}
}
if len(x.Description) > 0 {
i -= len(x.Description)
copy(dAtA[i:], x.Description)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description)))
i--
dAtA[i] = 0x2a
}
if len(x.Origin) > 0 {
i -= len(x.Origin)
copy(dAtA[i:], x.Origin)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin)))
i--
dAtA[i] = 0x22
}
if len(x.Authority) > 0 {
i -= len(x.Authority)
copy(dAtA[i:], x.Authority)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority)))
i--
dAtA[i] = 0x1a
}
if len(x.ServiceType) > 0 {
i -= len(x.ServiceType)
copy(dAtA[i:], x.ServiceType)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceType)))
i--
dAtA[i] = 0x12
}
if len(x.Id) > 0 {
i -= len(x.Id)
copy(dAtA[i:], x.Id)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Service)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Id = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceType", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.ServiceType = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Authority = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.ServiceEndpoints == nil {
x.ServiceEndpoints = make(map[string]string)
}
var mapkey string
var mapvalue string
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postStringIndexmapkey > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
var stringLenmapvalue uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapvalue := int(stringLenmapvalue)
if intStringLenmapvalue < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
if postStringIndexmapvalue < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postStringIndexmapvalue > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
iNdEx = postStringIndexmapvalue
} else {
iNdEx = entryPreIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > postIndex {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
x.ServiceEndpoints[mapkey] = mapvalue
iNdEx = postIndex
case 7:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Permissions == nil {
x.Permissions = &Permissions{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Permissions); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_ServiceInfo protoreflect.MessageDescriptor
fd_ServiceInfo_exists protoreflect.FieldDescriptor
fd_ServiceInfo_origin protoreflect.FieldDescriptor
fd_ServiceInfo_fingerprint protoreflect.FieldDescriptor
fd_ServiceInfo_service protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_ServiceInfo = File_did_v1_models_proto.Messages().ByName("ServiceInfo")
fd_ServiceInfo_exists = md_ServiceInfo.Fields().ByName("exists")
fd_ServiceInfo_origin = md_ServiceInfo.Fields().ByName("origin")
fd_ServiceInfo_fingerprint = md_ServiceInfo.Fields().ByName("fingerprint")
fd_ServiceInfo_service = md_ServiceInfo.Fields().ByName("service")
}
var _ protoreflect.Message = (*fastReflection_ServiceInfo)(nil)
type fastReflection_ServiceInfo ServiceInfo
func (x *ServiceInfo) ProtoReflect() protoreflect.Message {
return (*fastReflection_ServiceInfo)(x)
}
func (x *ServiceInfo) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_ServiceInfo_messageType fastReflection_ServiceInfo_messageType
var _ protoreflect.MessageType = fastReflection_ServiceInfo_messageType{}
type fastReflection_ServiceInfo_messageType struct{}
func (x fastReflection_ServiceInfo_messageType) Zero() protoreflect.Message {
return (*fastReflection_ServiceInfo)(nil)
}
func (x fastReflection_ServiceInfo_messageType) New() protoreflect.Message {
return new(fastReflection_ServiceInfo)
}
func (x fastReflection_ServiceInfo_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_ServiceInfo
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_ServiceInfo) Descriptor() protoreflect.MessageDescriptor {
return md_ServiceInfo
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_ServiceInfo) Type() protoreflect.MessageType {
return _fastReflection_ServiceInfo_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_ServiceInfo) New() protoreflect.Message {
return new(fastReflection_ServiceInfo)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_ServiceInfo) Interface() protoreflect.ProtoMessage {
return (*ServiceInfo)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_ServiceInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Exists != false {
value := protoreflect.ValueOfBool(x.Exists)
if !f(fd_ServiceInfo_exists, value) {
return
}
}
if x.Origin != "" {
value := protoreflect.ValueOfString(x.Origin)
if !f(fd_ServiceInfo_origin, value) {
return
}
}
if x.Fingerprint != "" {
value := protoreflect.ValueOfString(x.Fingerprint)
if !f(fd_ServiceInfo_fingerprint, value) {
return
}
}
if x.Service != nil {
value := protoreflect.ValueOfMessage(x.Service.ProtoReflect())
if !f(fd_ServiceInfo_service, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_ServiceInfo) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.ServiceInfo.exists":
return x.Exists != false
case "did.v1.ServiceInfo.origin":
return x.Origin != ""
case "did.v1.ServiceInfo.fingerprint":
return x.Fingerprint != ""
case "did.v1.ServiceInfo.service":
return x.Service != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ServiceInfo) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.ServiceInfo.exists":
x.Exists = false
case "did.v1.ServiceInfo.origin":
x.Origin = ""
case "did.v1.ServiceInfo.fingerprint":
x.Fingerprint = ""
case "did.v1.ServiceInfo.service":
x.Service = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_ServiceInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.ServiceInfo.exists":
value := x.Exists
return protoreflect.ValueOfBool(value)
case "did.v1.ServiceInfo.origin":
value := x.Origin
return protoreflect.ValueOfString(value)
case "did.v1.ServiceInfo.fingerprint":
value := x.Fingerprint
return protoreflect.ValueOfString(value)
case "did.v1.ServiceInfo.service":
value := x.Service
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ServiceInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.ServiceInfo.exists":
x.Exists = value.Bool()
case "did.v1.ServiceInfo.origin":
x.Origin = value.Interface().(string)
case "did.v1.ServiceInfo.fingerprint":
x.Fingerprint = value.Interface().(string)
case "did.v1.ServiceInfo.service":
x.Service = value.Message().Interface().(*Service)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ServiceInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.ServiceInfo.service":
if x.Service == nil {
x.Service = new(Service)
}
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
case "did.v1.ServiceInfo.exists":
panic(fmt.Errorf("field exists of message did.v1.ServiceInfo is not mutable"))
case "did.v1.ServiceInfo.origin":
panic(fmt.Errorf("field origin of message did.v1.ServiceInfo is not mutable"))
case "did.v1.ServiceInfo.fingerprint":
panic(fmt.Errorf("field fingerprint of message did.v1.ServiceInfo is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_ServiceInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.ServiceInfo.exists":
return protoreflect.ValueOfBool(false)
case "did.v1.ServiceInfo.origin":
return protoreflect.ValueOfString("")
case "did.v1.ServiceInfo.fingerprint":
return protoreflect.ValueOfString("")
case "did.v1.ServiceInfo.service":
m := new(Service)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceInfo"))
}
panic(fmt.Errorf("message did.v1.ServiceInfo does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_ServiceInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.ServiceInfo", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_ServiceInfo) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ServiceInfo) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_ServiceInfo) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_ServiceInfo) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*ServiceInfo)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.Exists {
n += 2
}
l = len(x.Origin)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Fingerprint)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Service != nil {
l = options.Size(x.Service)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*ServiceInfo)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.Service != nil {
encoded, err := options.Marshal(x.Service)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0x22
}
if len(x.Fingerprint) > 0 {
i -= len(x.Fingerprint)
copy(dAtA[i:], x.Fingerprint)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Fingerprint)))
i--
dAtA[i] = 0x1a
}
if len(x.Origin) > 0 {
i -= len(x.Origin)
copy(dAtA[i:], x.Origin)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin)))
i--
dAtA[i] = 0x12
}
if x.Exists {
i--
if x.Exists {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x8
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*ServiceInfo)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceInfo: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceInfo: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Exists = bool(v != 0)
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Fingerprint", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Fingerprint = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Service == nil {
x.Service = &Service{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_FirstPartyCaveat protoreflect.MessageDescriptor
fd_FirstPartyCaveat_scope protoreflect.FieldDescriptor
fd_FirstPartyCaveat_exp protoreflect.FieldDescriptor
fd_FirstPartyCaveat_cnf protoreflect.FieldDescriptor
fd_FirstPartyCaveat_aud protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_FirstPartyCaveat = File_did_v1_models_proto.Messages().ByName("FirstPartyCaveat")
fd_FirstPartyCaveat_scope = md_FirstPartyCaveat.Fields().ByName("scope")
fd_FirstPartyCaveat_exp = md_FirstPartyCaveat.Fields().ByName("exp")
fd_FirstPartyCaveat_cnf = md_FirstPartyCaveat.Fields().ByName("cnf")
fd_FirstPartyCaveat_aud = md_FirstPartyCaveat.Fields().ByName("aud")
}
var _ protoreflect.Message = (*fastReflection_FirstPartyCaveat)(nil)
type fastReflection_FirstPartyCaveat FirstPartyCaveat
func (x *FirstPartyCaveat) ProtoReflect() protoreflect.Message {
return (*fastReflection_FirstPartyCaveat)(x)
}
func (x *FirstPartyCaveat) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_FirstPartyCaveat_messageType fastReflection_FirstPartyCaveat_messageType
var _ protoreflect.MessageType = fastReflection_FirstPartyCaveat_messageType{}
type fastReflection_FirstPartyCaveat_messageType struct{}
func (x fastReflection_FirstPartyCaveat_messageType) Zero() protoreflect.Message {
return (*fastReflection_FirstPartyCaveat)(nil)
}
func (x fastReflection_FirstPartyCaveat_messageType) New() protoreflect.Message {
return new(fastReflection_FirstPartyCaveat)
}
func (x fastReflection_FirstPartyCaveat_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_FirstPartyCaveat
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_FirstPartyCaveat) Descriptor() protoreflect.MessageDescriptor {
return md_FirstPartyCaveat
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_FirstPartyCaveat) Type() protoreflect.MessageType {
return _fastReflection_FirstPartyCaveat_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_FirstPartyCaveat) New() protoreflect.Message {
return new(fastReflection_FirstPartyCaveat)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_FirstPartyCaveat) Interface() protoreflect.ProtoMessage {
return (*FirstPartyCaveat)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_FirstPartyCaveat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Scope != nil {
value := protoreflect.ValueOfMessage(x.Scope.ProtoReflect())
if !f(fd_FirstPartyCaveat_scope, value) {
return
}
}
if x.Exp != int64(0) {
value := protoreflect.ValueOfInt64(x.Exp)
if !f(fd_FirstPartyCaveat_exp, value) {
return
}
}
if x.Cnf != "" {
value := protoreflect.ValueOfString(x.Cnf)
if !f(fd_FirstPartyCaveat_cnf, value) {
return
}
}
if x.Aud != "" {
value := protoreflect.ValueOfString(x.Aud)
if !f(fd_FirstPartyCaveat_aud, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_FirstPartyCaveat) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.FirstPartyCaveat.scope":
return x.Scope != nil
case "did.v1.FirstPartyCaveat.exp":
return x.Exp != int64(0)
case "did.v1.FirstPartyCaveat.cnf":
return x.Cnf != ""
case "did.v1.FirstPartyCaveat.aud":
return x.Aud != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_FirstPartyCaveat) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.FirstPartyCaveat.scope":
x.Scope = nil
case "did.v1.FirstPartyCaveat.exp":
x.Exp = int64(0)
case "did.v1.FirstPartyCaveat.cnf":
x.Cnf = ""
case "did.v1.FirstPartyCaveat.aud":
x.Aud = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_FirstPartyCaveat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.FirstPartyCaveat.scope":
value := x.Scope
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "did.v1.FirstPartyCaveat.exp":
value := x.Exp
return protoreflect.ValueOfInt64(value)
case "did.v1.FirstPartyCaveat.cnf":
value := x.Cnf
return protoreflect.ValueOfString(value)
case "did.v1.FirstPartyCaveat.aud":
value := x.Aud
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_FirstPartyCaveat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.FirstPartyCaveat.scope":
x.Scope = value.Message().Interface().(*Permissions)
case "did.v1.FirstPartyCaveat.exp":
x.Exp = value.Int()
case "did.v1.FirstPartyCaveat.cnf":
x.Cnf = value.Interface().(string)
case "did.v1.FirstPartyCaveat.aud":
x.Aud = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_FirstPartyCaveat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.FirstPartyCaveat.scope":
if x.Scope == nil {
x.Scope = new(Permissions)
}
return protoreflect.ValueOfMessage(x.Scope.ProtoReflect())
case "did.v1.FirstPartyCaveat.exp":
panic(fmt.Errorf("field exp of message did.v1.FirstPartyCaveat is not mutable"))
case "did.v1.FirstPartyCaveat.cnf":
panic(fmt.Errorf("field cnf of message did.v1.FirstPartyCaveat is not mutable"))
case "did.v1.FirstPartyCaveat.aud":
panic(fmt.Errorf("field aud of message did.v1.FirstPartyCaveat is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_FirstPartyCaveat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.FirstPartyCaveat.scope":
m := new(Permissions)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "did.v1.FirstPartyCaveat.exp":
return protoreflect.ValueOfInt64(int64(0))
case "did.v1.FirstPartyCaveat.cnf":
return protoreflect.ValueOfString("")
case "did.v1.FirstPartyCaveat.aud":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FirstPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.FirstPartyCaveat does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_FirstPartyCaveat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.FirstPartyCaveat", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_FirstPartyCaveat) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_FirstPartyCaveat) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_FirstPartyCaveat) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_FirstPartyCaveat) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*FirstPartyCaveat)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.Scope != nil {
l = options.Size(x.Scope)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Exp != 0 {
n += 1 + runtime.Sov(uint64(x.Exp))
}
l = len(x.Cnf)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Aud)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*FirstPartyCaveat)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.Aud) > 0 {
i -= len(x.Aud)
copy(dAtA[i:], x.Aud)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aud)))
i--
dAtA[i] = 0x22
}
if len(x.Cnf) > 0 {
i -= len(x.Cnf)
copy(dAtA[i:], x.Cnf)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cnf)))
i--
dAtA[i] = 0x1a
}
if x.Exp != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Exp))
i--
dAtA[i] = 0x10
}
if x.Scope != nil {
encoded, err := options.Marshal(x.Scope)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*FirstPartyCaveat)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FirstPartyCaveat: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FirstPartyCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Scope == nil {
x.Scope = &Permissions{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scope); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType)
}
x.Exp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Exp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cnf", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Cnf = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Aud", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Aud = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_ThirdPartyCaveat protoreflect.MessageDescriptor
fd_ThirdPartyCaveat_scope protoreflect.FieldDescriptor
fd_ThirdPartyCaveat_exp protoreflect.FieldDescriptor
fd_ThirdPartyCaveat_cnf protoreflect.FieldDescriptor
fd_ThirdPartyCaveat_aud protoreflect.FieldDescriptor
)
func init() {
file_did_v1_models_proto_init()
md_ThirdPartyCaveat = File_did_v1_models_proto.Messages().ByName("ThirdPartyCaveat")
fd_ThirdPartyCaveat_scope = md_ThirdPartyCaveat.Fields().ByName("scope")
fd_ThirdPartyCaveat_exp = md_ThirdPartyCaveat.Fields().ByName("exp")
fd_ThirdPartyCaveat_cnf = md_ThirdPartyCaveat.Fields().ByName("cnf")
fd_ThirdPartyCaveat_aud = md_ThirdPartyCaveat.Fields().ByName("aud")
}
var _ protoreflect.Message = (*fastReflection_ThirdPartyCaveat)(nil)
type fastReflection_ThirdPartyCaveat ThirdPartyCaveat
func (x *ThirdPartyCaveat) ProtoReflect() protoreflect.Message {
return (*fastReflection_ThirdPartyCaveat)(x)
}
func (x *ThirdPartyCaveat) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_models_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_ThirdPartyCaveat_messageType fastReflection_ThirdPartyCaveat_messageType
var _ protoreflect.MessageType = fastReflection_ThirdPartyCaveat_messageType{}
type fastReflection_ThirdPartyCaveat_messageType struct{}
func (x fastReflection_ThirdPartyCaveat_messageType) Zero() protoreflect.Message {
return (*fastReflection_ThirdPartyCaveat)(nil)
}
func (x fastReflection_ThirdPartyCaveat_messageType) New() protoreflect.Message {
return new(fastReflection_ThirdPartyCaveat)
}
func (x fastReflection_ThirdPartyCaveat_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_ThirdPartyCaveat
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_ThirdPartyCaveat) Descriptor() protoreflect.MessageDescriptor {
return md_ThirdPartyCaveat
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_ThirdPartyCaveat) Type() protoreflect.MessageType {
return _fastReflection_ThirdPartyCaveat_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_ThirdPartyCaveat) New() protoreflect.Message {
return new(fastReflection_ThirdPartyCaveat)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_ThirdPartyCaveat) Interface() protoreflect.ProtoMessage {
return (*ThirdPartyCaveat)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_ThirdPartyCaveat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Scope != nil {
value := protoreflect.ValueOfMessage(x.Scope.ProtoReflect())
if !f(fd_ThirdPartyCaveat_scope, value) {
return
}
}
if x.Exp != int64(0) {
value := protoreflect.ValueOfInt64(x.Exp)
if !f(fd_ThirdPartyCaveat_exp, value) {
return
}
}
if x.Cnf != "" {
value := protoreflect.ValueOfString(x.Cnf)
if !f(fd_ThirdPartyCaveat_cnf, value) {
return
}
}
if x.Aud != "" {
value := protoreflect.ValueOfString(x.Aud)
if !f(fd_ThirdPartyCaveat_aud, value) {
return
}
}
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_ThirdPartyCaveat) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
return x.Scope != nil
case "did.v1.ThirdPartyCaveat.exp":
return x.Exp != int64(0)
case "did.v1.ThirdPartyCaveat.cnf":
return x.Cnf != ""
case "did.v1.ThirdPartyCaveat.aud":
return x.Aud != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ThirdPartyCaveat) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
x.Scope = nil
case "did.v1.ThirdPartyCaveat.exp":
x.Exp = int64(0)
case "did.v1.ThirdPartyCaveat.cnf":
x.Cnf = ""
case "did.v1.ThirdPartyCaveat.aud":
x.Aud = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_ThirdPartyCaveat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
value := x.Scope
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "did.v1.ThirdPartyCaveat.exp":
value := x.Exp
return protoreflect.ValueOfInt64(value)
case "did.v1.ThirdPartyCaveat.cnf":
value := x.Cnf
return protoreflect.ValueOfString(value)
case "did.v1.ThirdPartyCaveat.aud":
value := x.Aud
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ThirdPartyCaveat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
x.Scope = value.Message().Interface().(*Permissions)
case "did.v1.ThirdPartyCaveat.exp":
x.Exp = value.Int()
case "did.v1.ThirdPartyCaveat.cnf":
x.Cnf = value.Interface().(string)
case "did.v1.ThirdPartyCaveat.aud":
x.Aud = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ThirdPartyCaveat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
if x.Scope == nil {
x.Scope = new(Permissions)
}
return protoreflect.ValueOfMessage(x.Scope.ProtoReflect())
case "did.v1.ThirdPartyCaveat.exp":
panic(fmt.Errorf("field exp of message did.v1.ThirdPartyCaveat is not mutable"))
case "did.v1.ThirdPartyCaveat.cnf":
panic(fmt.Errorf("field cnf of message did.v1.ThirdPartyCaveat is not mutable"))
case "did.v1.ThirdPartyCaveat.aud":
panic(fmt.Errorf("field aud of message did.v1.ThirdPartyCaveat is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_ThirdPartyCaveat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.ThirdPartyCaveat.scope":
m := new(Permissions)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "did.v1.ThirdPartyCaveat.exp":
return protoreflect.ValueOfInt64(int64(0))
case "did.v1.ThirdPartyCaveat.cnf":
return protoreflect.ValueOfString("")
case "did.v1.ThirdPartyCaveat.aud":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat"))
}
panic(fmt.Errorf("message did.v1.ThirdPartyCaveat does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_ThirdPartyCaveat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.ThirdPartyCaveat", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_ThirdPartyCaveat) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_ThirdPartyCaveat) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_ThirdPartyCaveat) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_ThirdPartyCaveat) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*ThirdPartyCaveat)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.Scope != nil {
l = options.Size(x.Scope)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Exp != 0 {
n += 1 + runtime.Sov(uint64(x.Exp))
}
l = len(x.Cnf)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Aud)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*ThirdPartyCaveat)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.Aud) > 0 {
i -= len(x.Aud)
copy(dAtA[i:], x.Aud)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aud)))
i--
dAtA[i] = 0x22
}
if len(x.Cnf) > 0 {
i -= len(x.Cnf)
copy(dAtA[i:], x.Cnf)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cnf)))
i--
dAtA[i] = 0x1a
}
if x.Exp != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Exp))
i--
dAtA[i] = 0x10
}
if x.Scope != nil {
encoded, err := options.Marshal(x.Scope)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0xa
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*ThirdPartyCaveat)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ThirdPartyCaveat: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ThirdPartyCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if x.Scope == nil {
x.Scope = &Permissions{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scope); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exp", wireType)
}
x.Exp = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.Exp |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cnf", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Cnf = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Aud", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Aud = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: did/v1/models.proto
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)
)
// Alias defines a subject/origin pair
type Alias struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"`
}
func (x *Alias) Reset() {
*x = Alias{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Alias) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Alias) ProtoMessage() {}
// Deprecated: Use Alias.ProtoReflect.Descriptor instead.
func (*Alias) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{0}
}
func (x *Alias) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *Alias) GetOrigin() string {
if x != nil {
return x.Origin
}
return ""
}
func (x *Alias) GetController() string {
if x != nil {
return x.Controller
}
return ""
}
type Credential struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
AttestationType string `protobuf:"bytes,2,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"`
Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"`
CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
Transport []string `protobuf:"bytes,6,rep,name=transport,proto3" json:"transport,omitempty"`
SignCount uint32 `protobuf:"varint,7,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"`
UserPresent bool `protobuf:"varint,8,opt,name=user_present,json=userPresent,proto3" json:"user_present,omitempty"`
UserVerified bool `protobuf:"varint,9,opt,name=user_verified,json=userVerified,proto3" json:"user_verified,omitempty"`
BackupEligible bool `protobuf:"varint,10,opt,name=backup_eligible,json=backupEligible,proto3" json:"backup_eligible,omitempty"`
BackupState bool `protobuf:"varint,11,opt,name=backup_state,json=backupState,proto3" json:"backup_state,omitempty"`
CloneWarning bool `protobuf:"varint,12,opt,name=clone_warning,json=cloneWarning,proto3" json:"clone_warning,omitempty"`
}
func (x *Credential) Reset() {
*x = Credential{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Credential) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Credential) ProtoMessage() {}
// Deprecated: Use Credential.ProtoReflect.Descriptor instead.
func (*Credential) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{1}
}
func (x *Credential) GetSubject() string {
if x != nil {
return x.Subject
}
return ""
}
func (x *Credential) GetAttestationType() string {
if x != nil {
return x.AttestationType
}
return ""
}
func (x *Credential) GetOrigin() string {
if x != nil {
return x.Origin
}
return ""
}
func (x *Credential) GetCredentialId() []byte {
if x != nil {
return x.CredentialId
}
return nil
}
func (x *Credential) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *Credential) GetTransport() []string {
if x != nil {
return x.Transport
}
return nil
}
func (x *Credential) GetSignCount() uint32 {
if x != nil {
return x.SignCount
}
return 0
}
func (x *Credential) GetUserPresent() bool {
if x != nil {
return x.UserPresent
}
return false
}
func (x *Credential) GetUserVerified() bool {
if x != nil {
return x.UserVerified
}
return false
}
func (x *Credential) GetBackupEligible() bool {
if x != nil {
return x.BackupEligible
}
return false
}
func (x *Credential) GetBackupState() bool {
if x != nil {
return x.BackupState
}
return false
}
func (x *Credential) GetCloneWarning() bool {
if x != nil {
return x.CloneWarning
}
return false
}
// Document defines a DID document
type Document struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // The DID of the controller
Authentication []string `protobuf:"bytes,3,rep,name=authentication,proto3" json:"authentication,omitempty"`
AssertionMethod []string `protobuf:"bytes,4,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"`
CapabilityDelegation []string `protobuf:"bytes,5,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"`
CapabilityInvocation []string `protobuf:"bytes,6,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
Service []string `protobuf:"bytes,7,rep,name=service,proto3" json:"service,omitempty"`
}
func (x *Document) Reset() {
*x = Document{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Document) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Document) ProtoMessage() {}
// Deprecated: Use Document.ProtoReflect.Descriptor instead.
func (*Document) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{2}
}
func (x *Document) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Document) GetController() string {
if x != nil {
return x.Controller
}
return ""
}
func (x *Document) GetAuthentication() []string {
if x != nil {
return x.Authentication
}
return nil
}
func (x *Document) GetAssertionMethod() []string {
if x != nil {
return x.AssertionMethod
}
return nil
}
func (x *Document) GetCapabilityDelegation() []string {
if x != nil {
return x.CapabilityDelegation
}
return nil
}
func (x *Document) GetCapabilityInvocation() []string {
if x != nil {
return x.CapabilityInvocation
}
return nil
}
func (x *Document) GetService() []string {
if x != nil {
return x.Service
}
return nil
}
// Keyshare defines a keyshare from the MPC protocol
type Keyshare struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Metadata map[string]string `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Payloads map[string][]byte `protobuf:"bytes,2,rep,name=payloads,proto3" json:"payloads,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
PublicKey []byte `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
Role int32 `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"` // 0 =none, 1 = validator, 2 = user
}
func (x *Keyshare) Reset() {
*x = Keyshare{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Keyshare) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Keyshare) ProtoMessage() {}
// Deprecated: Use Keyshare.ProtoReflect.Descriptor instead.
func (*Keyshare) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{3}
}
func (x *Keyshare) GetMetadata() map[string]string {
if x != nil {
return x.Metadata
}
return nil
}
func (x *Keyshare) GetPayloads() map[string][]byte {
if x != nil {
return x.Payloads
}
return nil
}
func (x *Keyshare) GetProtocol() string {
if x != nil {
return x.Protocol
}
return ""
}
func (x *Keyshare) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *Keyshare) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *Keyshare) GetRole() int32 {
if x != nil {
return x.Role
}
return 0
}
// Permissions contains a list of grants and access control rules for
// a Service.
type Permissions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Grants []DIDNamespace `protobuf:"varint,1,rep,packed,name=grants,proto3,enum=did.v1.DIDNamespace" json:"grants,omitempty"`
Scopes []PermissionScope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"`
}
func (x *Permissions) Reset() {
*x = Permissions{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Permissions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Permissions) ProtoMessage() {}
// Deprecated: Use Permissions.ProtoReflect.Descriptor instead.
func (*Permissions) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{4}
}
func (x *Permissions) GetGrants() []DIDNamespace {
if x != nil {
return x.Grants
}
return nil
}
func (x *Permissions) GetScopes() []PermissionScope {
if x != nil {
return x.Scopes
}
return nil
}
// PubKey defines a public key for a did
type PubKey struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"`
Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"`
Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"`
Curve KeyCurve `protobuf:"varint,4,opt,name=curve,proto3,enum=did.v1.KeyCurve" json:"curve,omitempty"`
KeyType KeyType `protobuf:"varint,5,opt,name=key_type,json=keyType,proto3,enum=did.v1.KeyType" json:"key_type,omitempty"`
Raw []byte `protobuf:"bytes,6,opt,name=raw,proto3" json:"raw,omitempty"`
Jwk *PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"`
}
func (x *PubKey) Reset() {
*x = PubKey{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PubKey) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PubKey) ProtoMessage() {}
// Deprecated: Use PubKey.ProtoReflect.Descriptor instead.
func (*PubKey) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{5}
}
func (x *PubKey) GetRole() KeyRole {
if x != nil {
return x.Role
}
return KeyRole_KEY_ROLE_UNSPECIFIED
}
func (x *PubKey) GetAlgorithm() KeyAlgorithm {
if x != nil {
return x.Algorithm
}
return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED
}
func (x *PubKey) GetEncoding() KeyEncoding {
if x != nil {
return x.Encoding
}
return KeyEncoding_KEY_ENCODING_UNSPECIFIED
}
func (x *PubKey) GetCurve() KeyCurve {
if x != nil {
return x.Curve
}
return KeyCurve_KEY_CURVE_UNSPECIFIED
}
func (x *PubKey) GetKeyType() KeyType {
if x != nil {
return x.KeyType
}
return KeyType_KEY_TYPE_UNSPECIFIED
}
func (x *PubKey) GetRaw() []byte {
if x != nil {
return x.Raw
}
return nil
}
func (x *PubKey) GetJwk() *PubKey_JWK {
if x != nil {
return x.Jwk
}
return nil
}
// Service defines a Decentralized Service on the Sonr Blockchain
type Service struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"`
Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"`
}
func (x *Service) Reset() {
*x = Service{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Service) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Service) ProtoMessage() {}
// Deprecated: Use Service.ProtoReflect.Descriptor instead.
func (*Service) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{6}
}
func (x *Service) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Service) GetServiceType() string {
if x != nil {
return x.ServiceType
}
return ""
}
func (x *Service) GetAuthority() string {
if x != nil {
return x.Authority
}
return ""
}
func (x *Service) GetOrigin() string {
if x != nil {
return x.Origin
}
return ""
}
func (x *Service) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *Service) GetServiceEndpoints() map[string]string {
if x != nil {
return x.ServiceEndpoints
}
return nil
}
func (x *Service) GetPermissions() *Permissions {
if x != nil {
return x.Permissions
}
return nil
}
// ServicceInfo defines a Decentralized Service on the Sonr Blockchain
type ServiceInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
Service *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
}
func (x *ServiceInfo) Reset() {
*x = ServiceInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ServiceInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ServiceInfo) ProtoMessage() {}
// Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead.
func (*ServiceInfo) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{7}
}
func (x *ServiceInfo) GetExists() bool {
if x != nil {
return x.Exists
}
return false
}
func (x *ServiceInfo) GetOrigin() string {
if x != nil {
return x.Origin
}
return ""
}
func (x *ServiceInfo) GetFingerprint() string {
if x != nil {
return x.Fingerprint
}
return ""
}
func (x *ServiceInfo) GetService() *Service {
if x != nil {
return x.Service
}
return nil
}
// FirstPartyCaveat defines a first party caveat
type FirstPartyCaveat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"`
Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"`
Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"`
}
func (x *FirstPartyCaveat) Reset() {
*x = FirstPartyCaveat{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FirstPartyCaveat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FirstPartyCaveat) ProtoMessage() {}
// Deprecated: Use FirstPartyCaveat.ProtoReflect.Descriptor instead.
func (*FirstPartyCaveat) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{8}
}
func (x *FirstPartyCaveat) GetScope() *Permissions {
if x != nil {
return x.Scope
}
return nil
}
func (x *FirstPartyCaveat) GetExp() int64 {
if x != nil {
return x.Exp
}
return 0
}
func (x *FirstPartyCaveat) GetCnf() string {
if x != nil {
return x.Cnf
}
return ""
}
func (x *FirstPartyCaveat) GetAud() string {
if x != nil {
return x.Aud
}
return ""
}
// ThirdPartyCaveat defines a third party caveat
type ThirdPartyCaveat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Scope *Permissions `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
Exp int64 `protobuf:"varint,2,opt,name=exp,proto3" json:"exp,omitempty"`
Cnf string `protobuf:"bytes,3,opt,name=cnf,proto3" json:"cnf,omitempty"`
Aud string `protobuf:"bytes,4,opt,name=aud,proto3" json:"aud,omitempty"`
}
func (x *ThirdPartyCaveat) Reset() {
*x = ThirdPartyCaveat{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ThirdPartyCaveat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ThirdPartyCaveat) ProtoMessage() {}
// Deprecated: Use ThirdPartyCaveat.ProtoReflect.Descriptor instead.
func (*ThirdPartyCaveat) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{9}
}
func (x *ThirdPartyCaveat) GetScope() *Permissions {
if x != nil {
return x.Scope
}
return nil
}
func (x *ThirdPartyCaveat) GetExp() int64 {
if x != nil {
return x.Exp
}
return 0
}
func (x *ThirdPartyCaveat) GetCnf() string {
if x != nil {
return x.Cnf
}
return ""
}
func (x *ThirdPartyCaveat) GetAud() string {
if x != nil {
return x.Aud
}
return ""
}
// JWK represents a JSON Web Key
type PubKey_JWK struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type
Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys)
X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys)
Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys)
N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys)
E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys)
}
func (x *PubKey_JWK) Reset() {
*x = PubKey_JWK{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_models_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PubKey_JWK) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PubKey_JWK) ProtoMessage() {}
// Deprecated: Use PubKey_JWK.ProtoReflect.Descriptor instead.
func (*PubKey_JWK) Descriptor() ([]byte, []int) {
return file_did_v1_models_proto_rawDescGZIP(), []int{5, 0}
}
func (x *PubKey_JWK) GetKty() string {
if x != nil {
return x.Kty
}
return ""
}
func (x *PubKey_JWK) GetCrv() string {
if x != nil {
return x.Crv
}
return ""
}
func (x *PubKey_JWK) GetX() string {
if x != nil {
return x.X
}
return ""
}
func (x *PubKey_JWK) GetY() string {
if x != nil {
return x.Y
}
return ""
}
func (x *PubKey_JWK) GetN() string {
if x != nil {
return x.N
}
return ""
}
func (x *PubKey_JWK) GetE() string {
if x != nil {
return x.E
}
return ""
}
var File_did_v1_models_proto protoreflect.FileDescriptor
var file_did_v1_models_proto_rawDesc = []byte{
0x0a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64,
0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x59, 0x0a, 0x05, 0x41, 0x6c, 0x69,
0x61, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06,
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72,
0x69, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x6c, 0x65, 0x72, 0x22, 0xa3, 0x03, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x29, 0x0a,
0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67,
0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f,
0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69,
0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
0x72, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,
0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x50, 0x72, 0x65,
0x73, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72,
0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x75, 0x73, 0x65,
0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x5f, 0x65, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62,
0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x74, 0x61,
0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x77,
0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x63, 0x6c,
0x6f, 0x6e, 0x65, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44,
0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65,
0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72,
0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61,
0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62,
0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e,
0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14,
0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18,
0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xe5,
0x02, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x6d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e,
0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x70, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12,
0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x18,
0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65,
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x1a, 0x3b, 0x0a, 0x0d,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x50, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44,
0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x67, 0x72, 0x61,
0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63,
0x6f, 0x70, 0x65, 0x73, 0x22, 0x81, 0x03, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12,
0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e,
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04,
0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
0x2e, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61,
0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f,
0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64,
0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52,
0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x75, 0x72,
0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76,
0x31, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76,
0x65, 0x12, 0x2a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79,
0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12,
0x24, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64,
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x57, 0x4b,
0x52, 0x03, 0x6a, 0x77, 0x6b, 0x1a, 0x61, 0x0a, 0x03, 0x4a, 0x57, 0x4b, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x72, 0x76,
0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78, 0x12, 0x0c,
0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c, 0x0a, 0x01,
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0xe4, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x52, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f,
0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64,
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69,
0x6e, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76,
0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70,
0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
0x8a, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69,
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12,
0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e,
0x74, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x73, 0x0a, 0x10,
0x46, 0x69, 0x72, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74,
0x12, 0x29, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65,
0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x10, 0x0a,
0x03, 0x63, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6e, 0x66, 0x12,
0x10, 0x0a, 0x03, 0x61, 0x75, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x75,
0x64, 0x22, 0x73, 0x0a, 0x10, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x43,
0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65,
0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65,
0x78, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x63, 0x6e, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x75, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x61, 0x75, 0x64, 0x42, 0x7b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69,
0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44,
0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69,
0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_did_v1_models_proto_rawDescOnce sync.Once
file_did_v1_models_proto_rawDescData = file_did_v1_models_proto_rawDesc
)
func file_did_v1_models_proto_rawDescGZIP() []byte {
file_did_v1_models_proto_rawDescOnce.Do(func() {
file_did_v1_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_models_proto_rawDescData)
})
return file_did_v1_models_proto_rawDescData
}
var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_did_v1_models_proto_goTypes = []interface{}{
(*Alias)(nil), // 0: did.v1.Alias
(*Credential)(nil), // 1: did.v1.Credential
(*Document)(nil), // 2: did.v1.Document
(*Keyshare)(nil), // 3: did.v1.Keyshare
(*Permissions)(nil), // 4: did.v1.Permissions
(*PubKey)(nil), // 5: did.v1.PubKey
(*Service)(nil), // 6: did.v1.Service
(*ServiceInfo)(nil), // 7: did.v1.ServiceInfo
(*FirstPartyCaveat)(nil), // 8: did.v1.FirstPartyCaveat
(*ThirdPartyCaveat)(nil), // 9: did.v1.ThirdPartyCaveat
nil, // 10: did.v1.Keyshare.MetadataEntry
nil, // 11: did.v1.Keyshare.PayloadsEntry
(*PubKey_JWK)(nil), // 12: did.v1.PubKey.JWK
nil, // 13: did.v1.Service.ServiceEndpointsEntry
(DIDNamespace)(0), // 14: did.v1.DIDNamespace
(PermissionScope)(0), // 15: did.v1.PermissionScope
(KeyRole)(0), // 16: did.v1.KeyRole
(KeyAlgorithm)(0), // 17: did.v1.KeyAlgorithm
(KeyEncoding)(0), // 18: did.v1.KeyEncoding
(KeyCurve)(0), // 19: did.v1.KeyCurve
(KeyType)(0), // 20: did.v1.KeyType
}
var file_did_v1_models_proto_depIdxs = []int32{
10, // 0: did.v1.Keyshare.metadata:type_name -> did.v1.Keyshare.MetadataEntry
11, // 1: did.v1.Keyshare.payloads:type_name -> did.v1.Keyshare.PayloadsEntry
14, // 2: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace
15, // 3: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope
16, // 4: did.v1.PubKey.role:type_name -> did.v1.KeyRole
17, // 5: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm
18, // 6: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding
19, // 7: did.v1.PubKey.curve:type_name -> did.v1.KeyCurve
20, // 8: did.v1.PubKey.key_type:type_name -> did.v1.KeyType
12, // 9: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JWK
13, // 10: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry
4, // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions
6, // 12: did.v1.ServiceInfo.service:type_name -> did.v1.Service
4, // 13: did.v1.FirstPartyCaveat.scope:type_name -> did.v1.Permissions
4, // 14: did.v1.ThirdPartyCaveat.scope:type_name -> did.v1.Permissions
15, // [15:15] is the sub-list for method output_type
15, // [15:15] is the sub-list for method input_type
15, // [15:15] is the sub-list for extension type_name
15, // [15:15] is the sub-list for extension extendee
0, // [0:15] is the sub-list for field type_name
}
func init() { file_did_v1_models_proto_init() }
func file_did_v1_models_proto_init() {
if File_did_v1_models_proto != nil {
return
}
file_did_v1_genesis_proto_init()
if !protoimpl.UnsafeEnabled {
file_did_v1_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Alias); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Credential); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Document); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Keyshare); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Permissions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PubKey); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Service); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ServiceInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FirstPartyCaveat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ThirdPartyCaveat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PubKey_JWK); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_did_v1_models_proto_rawDesc,
NumEnums: 0,
NumMessages: 14,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_did_v1_models_proto_goTypes,
DependencyIndexes: file_did_v1_models_proto_depIdxs,
MessageInfos: file_did_v1_models_proto_msgTypes,
}.Build()
File_did_v1_models_proto = out.File
file_did_v1_models_proto_rawDesc = nil
file_did_v1_models_proto_goTypes = nil
file_did_v1_models_proto_depIdxs = nil
}