2024-07-05 22:20:13 -04:00
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package didv1
import (
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
2024-09-05 01:24:57 -04:00
_ "github.com/cosmos/gogoproto/gogoproto"
2024-07-05 22:20:13 -04:00
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"
2024-07-06 03:02:45 -04:00
sort "sort"
2024-07-05 22:20:13 -04:00
sync "sync"
)
var (
2024-09-11 15:10:54 -04:00
md_Alias protoreflect . MessageDescriptor
fd_Alias_subject protoreflect . FieldDescriptor
fd_Alias_origin protoreflect . FieldDescriptor
fd_Alias_controller protoreflect . FieldDescriptor
2024-07-05 22:20:13 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_Alias )( nil )
2024-08-31 12:49:44 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Alias Alias
2024-08-31 12:49:44 -04:00
2024-09-11 15:10:54 -04:00
func ( x * Alias ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_Alias )( x )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) slowProtoReflect () protoreflect . Message {
2024-08-31 12:49:44 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 0 ]
2024-07-05 22:20:13 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_Alias_messageType fastReflection_Alias_messageType
var _ protoreflect . MessageType = fastReflection_Alias_messageType {}
2024-07-05 22:20:13 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Alias_messageType struct {}
2024-07-05 22:20:13 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Alias_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_Alias )( nil )
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Alias_messageType ) New () protoreflect . Message {
return new ( fastReflection_Alias )
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Alias_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_Alias
2024-07-05 22:20:13 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Descriptor () protoreflect . MessageDescriptor {
return md_Alias
2024-07-05 22:20:13 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Type () protoreflect . MessageType {
return _fastReflection_Alias_messageType
2024-07-05 22:20:13 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) New () protoreflect . Message {
return new ( fastReflection_Alias )
2024-07-05 22:20:13 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Interface () protoreflect . ProtoMessage {
return ( * Alias )( x )
2024-07-05 22:20:13 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
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 ) {
2024-07-05 22:20:13 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Alias.subject" :
return x . Subject != ""
case "did.v1.Alias.origin" :
return x . Origin != ""
case "did.v1.Alias.controller" :
return x . Controller != ""
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Alias.subject" :
x . Subject = ""
case "did.v1.Alias.origin" :
x . Origin = ""
case "did.v1.Alias.controller" :
x . Controller = ""
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-07-05 22:20:13 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , descriptor . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" ))
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Alias.subject" :
return protoreflect . ValueOfString ( "" )
case "did.v1.Alias.origin" :
return protoreflect . ValueOfString ( "" )
case "did.v1.Alias.controller" :
return protoreflect . ValueOfString ( "" )
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Alias" ))
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Alias does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-07-05 22:20:13 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Alias" , d . FullName ()))
2024-07-05 22:20:13 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) GetUnknown () protoreflect . RawFields {
2024-07-05 22:20:13 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) SetUnknown ( fields protoreflect . RawFields ) {
2024-07-05 22:20:13 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) IsValid () bool {
2024-07-05 22:20:13 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Alias ) ProtoMethods () * protoiface . Methods {
2024-07-05 22:20:13 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Alias )
2024-07-05 22:20:13 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-07-05 22:20:13 -04:00
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Alias )
2024-07-05 22:20:13 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
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 )))
2024-08-10 17:19:59 -04:00
i --
2024-09-05 01:24:57 -04:00
dAtA [ i ] = 0xa
2024-07-05 22:20:13 -04:00
}
2024-09-05 01:24:57 -04:00
if input . Buf != nil {
input . Buf = append ( input . Buf , dAtA ... )
} else {
input . Buf = dAtA
2024-07-05 22:20:13 -04:00
}
return protoiface . MarshalOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Buf : input . Buf ,
}, nil
}
unmarshal := func ( input protoiface . UnmarshalInput ) ( protoiface . UnmarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Alias )
2024-07-05 22:20:13 -04:00
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 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Alias: wiretype end group for non-group" )
2024-07-05 22:20:13 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Alias: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-07-05 22:20:13 -04:00
}
switch fieldNum {
case 1 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Subject" , wireType )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
2024-08-10 17:01:14 -04:00
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 ++
2024-09-11 15:10:54 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-10 17:01:14 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
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
}
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
x . Controller = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:01:14 -04:00
iNdEx = postIndex
2024-08-31 12:49:44 -04:00
default :
iNdEx = preIndex
skippy , err := runtime . Skip ( dAtA [ iNdEx :])
if err != nil {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, err
2024-08-10 17:01:14 -04:00
}
2024-08-31 12:49:44 -04:00
if ( skippy < 0 ) || ( iNdEx + skippy ) < 0 {
2024-07-05 22:20:13 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-08-31 12:49:44 -04:00
if ( iNdEx + skippy ) > l {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-08-31 12:49:44 -04:00
if ! options . DiscardUnknown {
x . unknownFields = append ( x . unknownFields , dAtA [ iNdEx : iNdEx + skippy ] ... )
2024-08-10 17:19:59 -04:00
}
iNdEx += skippy
}
}
2024-08-10 17:01:14 -04:00
2024-08-10 17:19:59 -04:00
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 ,
}
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . List = ( * _Credential_6_list )( nil )
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type _Credential_6_list struct {
2024-08-31 12:49:44 -04:00
list * [] string
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) Len () int {
2024-08-10 17:01:14 -04:00
if x . list == nil {
return 0
}
return len ( * x . list )
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) Get ( i int ) protoreflect . Value {
2024-08-31 12:49:44 -04:00
return protoreflect . ValueOfString (( * x . list )[ i ])
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) Set ( i int , value protoreflect . Value ) {
2024-08-31 12:49:44 -04:00
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
2024-08-10 17:01:14 -04:00
( * x . list )[ i ] = concreteValue
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) Append ( value protoreflect . Value ) {
2024-08-31 12:49:44 -04:00
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
2024-08-10 17:01:14 -04:00
* x . list = append ( * x . list , concreteValue )
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) AppendMutable () protoreflect . Value {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) Truncate ( n int ) {
2024-08-10 17:01:14 -04:00
* x . list = ( * x . list )[: n ]
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) NewElement () protoreflect . Value {
2024-08-31 12:49:44 -04:00
v := ""
return protoreflect . ValueOfString ( v )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Credential_6_list ) IsValid () bool {
2024-08-10 17:01:14 -04:00
return x . list != nil
}
2024-08-10 17:19:59 -04:00
var (
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
)
2024-08-10 17:01:14 -04:00
2024-08-10 17:19:59 -04:00
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
md_Credential = File_did_v1_models_proto . Messages (). ByName ( "Credential" )
2024-09-11 15:10:54 -04:00
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" )
2024-08-31 12:49:44 -04:00
fd_Credential_credential_id = md_Credential . Fields (). ByName ( "credential_id" )
2024-09-11 15:10:54 -04:00
fd_Credential_public_key = md_Credential . Fields (). ByName ( "public_key" )
2024-08-31 12:49:44 -04:00
fd_Credential_transport = md_Credential . Fields (). ByName ( "transport" )
2024-09-11 15:10:54 -04:00
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" )
2024-08-10 17:01:14 -04:00
}
2024-08-31 12:49:44 -04:00
var _ protoreflect . Message = ( * fastReflection_Credential )( nil )
2024-08-10 17:01:14 -04:00
2024-08-31 12:49:44 -04:00
type fastReflection_Credential Credential
2024-08-10 17:01:14 -04:00
2024-08-31 12:49:44 -04:00
func ( x * Credential ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_Credential )( x )
2024-08-10 17:01:14 -04:00
}
2024-08-31 12:49:44 -04:00
func ( x * Credential ) slowProtoReflect () protoreflect . Message {
mi := & file_did_v1_models_proto_msgTypes [ 1 ]
2024-08-10 17:19:59 -04:00
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 )
}
2024-08-31 12:49:44 -04:00
var _fastReflection_Credential_messageType fastReflection_Credential_messageType
var _ protoreflect . MessageType = fastReflection_Credential_messageType {}
2024-08-10 17:19:59 -04:00
2024-08-31 12:49:44 -04:00
type fastReflection_Credential_messageType struct {}
2024-08-10 17:19:59 -04:00
2024-08-31 12:49:44 -04:00
func ( x fastReflection_Credential_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_Credential )( nil )
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
func ( x fastReflection_Credential_messageType ) New () protoreflect . Message {
return new ( fastReflection_Credential )
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
func ( x fastReflection_Credential_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_Credential
2024-08-10 17:19:59 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Descriptor () protoreflect . MessageDescriptor {
return md_Credential
2024-08-10 17:19:59 -04:00
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Type () protoreflect . MessageType {
return _fastReflection_Credential_messageType
2024-08-10 17:19:59 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) New () protoreflect . Message {
return new ( fastReflection_Credential )
2024-08-10 17:19:59 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Interface () protoreflect . ProtoMessage {
return ( * Credential )( x )
2024-08-10 17:19:59 -04:00
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Range ( f func ( protoreflect . FieldDescriptor , protoreflect . Value ) bool ) {
2024-09-11 15:10:54 -04:00
if x . Subject != "" {
value := protoreflect . ValueOfString ( x . Subject )
if ! f ( fd_Credential_subject , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-08-31 12:49:44 -04:00
if len ( x . CredentialId ) != 0 {
value := protoreflect . ValueOfBytes ( x . CredentialId )
if ! f ( fd_Credential_credential_id , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if len ( x . PublicKey ) != 0 {
value := protoreflect . ValueOfBytes ( x . PublicKey )
if ! f ( fd_Credential_public_key , value ) {
return
}
}
2024-08-31 12:49:44 -04:00
if len ( x . Transport ) != 0 {
2024-09-11 15:10:54 -04:00
value := protoreflect . ValueOfList ( & _Credential_6_list { list : & x . Transport })
2024-08-31 12:49:44 -04:00
if ! f ( fd_Credential_transport , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . SignCount != uint32 ( 0 ) {
value := protoreflect . ValueOfUint32 ( x . SignCount )
if ! f ( fd_Credential_sign_count , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:19:59 -04:00
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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 != ""
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.credential_id" :
return len ( x . CredentialId ) != 0
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.public_key" :
return len ( x . PublicKey ) != 0
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
return len ( x . Transport ) != 0
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.subject" :
x . Subject = ""
case "did.v1.Credential.attestation_type" :
x . AttestationType = ""
case "did.v1.Credential.origin" :
x . Origin = ""
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.credential_id" :
x . CredentialId = nil
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.public_key" :
x . PublicKey = nil
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
x . Transport = nil
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.subject" :
value := x . Subject
return protoreflect . ValueOfString ( value )
case "did.v1.Credential.attestation_type" :
value := x . AttestationType
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.origin" :
value := x . Origin
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfString ( value )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.credential_id" :
value := x . CredentialId
return protoreflect . ValueOfBytes ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.public_key" :
value := x . PublicKey
return protoreflect . ValueOfBytes ( value )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
if len ( x . Transport ) == 0 {
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfList ( & _Credential_6_list {})
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
listValue := & _Credential_6_list { list : & x . Transport }
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfList ( listValue )
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
default :
if descriptor . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.credential_id" :
x . CredentialId = value . Bytes ()
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.public_key" :
x . PublicKey = value . Bytes ()
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
2024-08-10 17:19:59 -04:00
lv := value . List ()
2024-09-11 15:10:54 -04:00
clv := lv .( * _Credential_6_list )
2024-08-31 12:49:44 -04:00
x . Transport = * clv . list
2024-09-11 15:10:54 -04:00
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 ()
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
if x . Transport == nil {
x . Transport = [] string {}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
value := & _Credential_6_list { list : & x . Transport }
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfList ( value )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.subject" :
panic ( fmt . Errorf ( "field subject of message did.v1.Credential is not mutable" ))
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.subject" :
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.attestation_type" :
return protoreflect . ValueOfString ( "" )
case "did.v1.Credential.origin" :
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfString ( "" )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.credential_id" :
return protoreflect . ValueOfBytes ( nil )
2024-09-11 15:10:54 -04:00
case "did.v1.Credential.public_key" :
return protoreflect . ValueOfBytes ( nil )
2024-08-31 12:49:44 -04:00
case "did.v1.Credential.transport" :
list := [] string {}
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Credential" ))
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "message did.v1.Credential does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:19:59 -04:00
switch d . FullName () {
default :
2024-08-31 12:49:44 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Credential" , d . FullName ()))
2024-08-10 17:19:59 -04:00
}
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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:19:59 -04:00
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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:19:59 -04:00
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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) IsValid () bool {
2024-08-10 17:19:59 -04:00
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.
2024-08-31 12:49:44 -04:00
func ( x * fastReflection_Credential ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:19:59 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-08-31 12:49:44 -04:00
x := input . Message . Interface ().( * Credential )
2024-08-10 17:19:59 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
l = len ( x . Subject )
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
l = len ( x . AttestationType )
2024-08-10 17:19:59 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . Origin )
2024-08-10 17:19:59 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-08-31 12:49:44 -04:00
l = len ( x . CredentialId )
2024-08-10 17:19:59 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . PublicKey )
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-08-31 12:49:44 -04:00
if len ( x . Transport ) > 0 {
for _ , s := range x . Transport {
l = len ( s )
2024-08-10 17:19:59 -04:00
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
}
2024-09-11 15:10:54 -04:00
if x . SignCount != 0 {
n += 1 + runtime . Sov ( uint64 ( x . SignCount ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
}
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-08-31 12:49:44 -04:00
x := input . Message . Interface ().( * Credential )
2024-08-10 17:19:59 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
if x . CloneWarning {
2024-08-10 17:19:59 -04:00
i --
2024-09-11 15:10:54 -04:00
if x . CloneWarning {
dAtA [ i ] = 1
} else {
dAtA [ i ] = 0
}
2024-08-10 17:19:59 -04:00
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0x60
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
if x . BackupState {
i --
if x . BackupState {
dAtA [ i ] = 1
} else {
dAtA [ i ] = 0
2024-08-10 17:19:59 -04:00
}
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0x58
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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 )))
2024-08-10 17:19:59 -04:00
i --
dAtA [ i ] = 0x12
}
2024-09-11 15:10:54 -04:00
if len ( x . Subject ) > 0 {
i -= len ( x . Subject )
copy ( dAtA [ i :], x . Subject )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Subject )))
2024-08-10 17:19:59 -04:00
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 ) {
2024-08-31 12:49:44 -04:00
x := input . Message . Interface ().( * Credential )
2024-08-10 17:19:59 -04:00
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 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Credential: wiretype end group for non-group" )
2024-08-10 17:19:59 -04:00
}
if fieldNum <= 0 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Credential: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:19:59 -04:00
}
switch fieldNum {
case 1 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Subject" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Subject = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
case 2 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field AttestationType" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . AttestationType = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
case 3 :
2024-09-11 15:10:54 -04:00
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 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field CredentialId" , wireType )
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
var byteLen int
2024-08-10 17:19:59 -04:00
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 ++
2024-08-31 12:49:44 -04:00
byteLen |= int ( b & 0x7F ) << shift
2024-08-10 17:19:59 -04:00
if b < 0x80 {
break
}
}
2024-08-31 12:49:44 -04:00
if byteLen < 0 {
2024-08-10 17:19:59 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-08-31 12:49:44 -04:00
postIndex := iNdEx + byteLen
2024-08-10 17:19:59 -04:00
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
}
2024-08-31 12:49:44 -04:00
x . CredentialId = append ( x . CredentialId [: 0 ], dAtA [ iNdEx : postIndex ] ... )
if x . CredentialId == nil {
x . CredentialId = [] byte {}
}
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 5 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field PublicKey" , wireType )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
var byteLen int
2024-08-10 17:19:59 -04:00
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 ++
2024-09-11 15:10:54 -04:00
byteLen |= int ( b & 0x7F ) << shift
2024-08-10 17:19:59 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
if byteLen < 0 {
2024-08-10 17:19:59 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + byteLen
2024-08-10 17:19:59 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . PublicKey = append ( x . PublicKey [: 0 ], dAtA [ iNdEx : postIndex ] ... )
if x . PublicKey == nil {
x . PublicKey = [] byte {}
}
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-08-31 12:49:44 -04:00
case 6 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Transport" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Transport = append ( x . Transport , string ( dAtA [ iNdEx : postIndex ]))
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-08-31 12:49:44 -04:00
case 7 :
2024-09-11 15:10:54 -04:00
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field SignCount" , wireType )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
x . SignCount = 0
2024-08-10 17:19:59 -04:00
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 ++
2024-09-11 15:10:54 -04:00
x . SignCount |= uint32 ( b & 0x7F ) << shift
2024-08-10 17:19:59 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
case 8 :
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field UserPresent" , wireType )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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
}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
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 ,
}
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . List = ( * _Document_3_list )( nil )
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
type _Document_3_list struct {
2024-08-31 12:49:44 -04:00
list * [] string
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) Len () int {
2024-08-31 12:49:44 -04:00
if x . list == nil {
return 0
}
return len ( * x . list )
}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) Get ( i int ) protoreflect . Value {
2024-08-31 12:49:44 -04:00
return protoreflect . ValueOfString (( * x . list )[ i ])
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) Set ( i int , value protoreflect . Value ) {
2024-08-31 12:49:44 -04:00
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
( * x . list )[ i ] = concreteValue
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) Append ( value protoreflect . Value ) {
2024-08-31 12:49:44 -04:00
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
* x . list = append ( * x . list , concreteValue )
}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
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" ))
2024-08-31 12:49:44 -04:00
}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) Truncate ( n int ) {
2024-08-31 12:49:44 -04:00
* x . list = ( * x . list )[: n ]
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) NewElement () protoreflect . Value {
2024-08-31 12:49:44 -04:00
v := ""
return protoreflect . ValueOfString ( v )
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
2024-09-11 15:10:54 -04:00
func ( x * _Document_3_list ) IsValid () bool {
2024-08-31 12:49:44 -04:00
return x . list != nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . List = ( * _Document_4_list )( nil )
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
type _Document_4_list struct {
list * [] string
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) Len () int {
if x . list == nil {
return 0
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
return len ( * x . list )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) Get ( i int ) protoreflect . Value {
return protoreflect . ValueOfString (( * x . list )[ i ])
}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) Set ( i int , value protoreflect . Value ) {
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
( * x . list )[ i ] = concreteValue
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) Append ( value protoreflect . Value ) {
valueUnwrapped := value . String ()
concreteValue := valueUnwrapped
* x . list = append ( * x . list , concreteValue )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) Truncate ( n int ) {
* x . list = ( * x . list )[: n ]
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) NewElement () protoreflect . Value {
v := ""
return protoreflect . ValueOfString ( v )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * _Document_4_list ) IsValid () bool {
return x . list != nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . List = ( * _Document_5_list )( nil )
type _Document_5_list struct {
list * [] string
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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.
2024-08-10 17:19:59 -04:00
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Controller != "" {
value := protoreflect . ValueOfString ( x . Controller )
if ! f ( fd_Document_controller , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if len ( x . CapabilityInvocation ) != 0 {
value := protoreflect . ValueOfList ( & _Document_6_list { list : & x . CapabilityInvocation })
if ! f ( fd_Document_capability_invocation , value ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if len ( x . Service ) != 0 {
value := protoreflect . ValueOfList ( & _Document_7_list { list : & x . Service })
if ! f ( fd_Document_service , value ) {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Document" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Document does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Document.id" :
value := x . Id
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.Document.controller" :
value := x . Controller
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
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 {})
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
listValue := & _Document_7_list { list : & x . Service }
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfList ( listValue )
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Document" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Document does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" :
2024-08-10 17:19:59 -04:00
lv := value . List ()
2024-09-11 15:10:54 -04:00
clv := lv .( * _Document_7_list )
x . Service = * clv . list
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Document" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Document does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 {}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
value := & _Document_7_list { list : & x . Service }
2024-08-10 17:19:59 -04:00
return protoreflect . ValueOfList ( value )
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Document" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Document does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Document.id" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.Document.controller" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
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" :
2024-08-10 17:19:59 -04:00
list := [] string {}
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfList ( & _Document_7_list { list : & list })
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Document" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Document does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:19:59 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Document" , d . FullName ()))
2024-08-10 17:19:59 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) IsValid () bool {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Document ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:19:59 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Document )
2024-08-10 17:19:59 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
l = len ( x . Id )
2024-08-10 17:19:59 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . Controller )
2024-09-05 01:24:57 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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 ))
}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Service ) > 0 {
for _ , s := range x . Service {
2024-08-10 17:19:59 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Document )
2024-08-10 17:19:59 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
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 ])))
2024-08-10 17:19:59 -04:00
i --
2024-09-05 01:24:57 -04:00
dAtA [ i ] = 0x2a
2024-08-10 17:19:59 -04:00
}
}
2024-09-11 15:10:54 -04:00
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
}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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
}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Controller ) > 0 {
i -= len ( x . Controller )
copy ( dAtA [ i :], x . Controller )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Controller )))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x12
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Id ) > 0 {
i -= len ( x . Id )
copy ( dAtA [ i :], x . Id )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Id )))
2024-08-10 17:19:59 -04:00
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0xa
2024-08-10 17:19:59 -04:00
}
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Document )
2024-08-10 17:19:59 -04:00
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 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Document: wiretype end group for non-group" )
2024-08-10 17:19:59 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Document: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:19:59 -04:00
}
switch fieldNum {
case 1 :
2024-09-11 15:10:54 -04:00
if wireType != 2 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Id" , wireType )
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
2024-08-10 17:19:59 -04:00
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 ++
2024-09-11 15:10:54 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-10 17:19:59 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
case 2 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Controller" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Controller = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-09-05 01:24:57 -04:00
case 3 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Authentication" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Authentication = append ( x . Authentication , string ( dAtA [ iNdEx : postIndex ]))
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-09-05 01:24:57 -04:00
case 4 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field AssertionMethod" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . AssertionMethod = append ( x . AssertionMethod , string ( dAtA [ iNdEx : postIndex ]))
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-09-05 01:24:57 -04:00
case 5 :
2024-08-10 17:19:59 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field CapabilityDelegation" , wireType )
2024-08-10 17:19:59 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . CapabilityDelegation = append ( x . CapabilityDelegation , string ( dAtA [ iNdEx : postIndex ]))
2024-08-10 17:19:59 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 6 :
if wireType != 2 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field CapabilityInvocation" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
for shift := uint ( 0 ); ; shift += 7 {
if shift >= 64 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrIntOverflow
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if iNdEx >= l {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-11 15:10:54 -04:00
b := dAtA [ iNdEx ]
iNdEx ++
stringLen |= uint64 ( b & 0x7F ) << shift
if b < 0x80 {
break
2024-09-05 01:24:57 -04:00
}
}
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if iNdEx >= l {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-11 15:10:54 -04:00
b := dAtA [ iNdEx ]
iNdEx ++
stringLen |= uint64 ( b & 0x7F ) << shift
if b < 0x80 {
break
2024-09-05 01:24:57 -04:00
}
}
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
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 ,
}
}
2024-09-11 15:10:54 -04:00
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
}
2024-09-05 01:24:57 -04:00
var (
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
)
func init () {
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_Keyshare )( nil )
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Keyshare Keyshare
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_Keyshare )( x )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) slowProtoReflect () protoreflect . Message {
mi := & file_did_v1_models_proto_msgTypes [ 3 ]
2024-09-05 01:24:57 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_Keyshare_messageType fastReflection_Keyshare_messageType
var _ protoreflect . MessageType = fastReflection_Keyshare_messageType {}
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Keyshare_messageType struct {}
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Keyshare_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_Keyshare )( nil )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Keyshare_messageType ) New () protoreflect . Message {
return new ( fastReflection_Keyshare )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Keyshare_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_Keyshare
2024-09-05 01:24:57 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Descriptor () protoreflect . MessageDescriptor {
return md_Keyshare
2024-09-05 01:24:57 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Type () protoreflect . MessageType {
return _fastReflection_Keyshare_messageType
2024-09-05 01:24:57 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) New () protoreflect . Message {
return new ( fastReflection_Keyshare )
2024-09-05 01:24:57 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Interface () protoreflect . ProtoMessage {
return ( * Keyshare )( x )
2024-09-05 01:24:57 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
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 ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if len ( x . Payloads ) != 0 {
value := protoreflect . ValueOfMap ( & _Keyshare_2_map { m : & x . Payloads })
if ! f ( fd_Keyshare_payloads , value ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
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 ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Role != int32 ( 0 ) {
value := protoreflect . ValueOfInt32 ( x . Role )
if ! f ( fd_Keyshare_role , value ) {
2024-09-05 01:24:57 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Keyshare.metadata" :
2024-09-05 01:24:57 -04:00
x . Metadata = nil
2024-09-11 15:10:54 -04:00
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 )
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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
2024-08-10 17:19:59 -04:00
// of the value; to obtain a mutable reference, use Mutable.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
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 )
2024-09-05 01:24:57 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , descriptor . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 ())
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Keyshare.metadata" :
2024-09-05 01:24:57 -04:00
if x . Metadata == nil {
2024-09-11 15:10:54 -04:00
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" ))
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
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 ))
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Keyshare" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Keyshare does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-09-05 01:24:57 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Keyshare" , d . FullName ()))
2024-09-05 01:24:57 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) GetUnknown () protoreflect . RawFields {
2024-09-05 01:24:57 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) SetUnknown ( fields protoreflect . RawFields ) {
2024-09-05 01:24:57 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) IsValid () bool {
2024-09-05 01:24:57 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Keyshare ) ProtoMethods () * protoiface . Methods {
2024-09-05 01:24:57 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Keyshare )
2024-09-05 01:24:57 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
2024-09-11 15:10:54 -04:00
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 )
}
}
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
l = len ( x . Protocol )
2024-09-05 01:24:57 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . PublicKey )
2024-09-05 01:24:57 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
if x . Version != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Version ))
}
if x . Role != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Role ))
2024-09-05 01:24:57 -04:00
}
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Keyshare )
2024-09-05 01:24:57 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
if x . Role != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Role ))
2024-09-05 01:24:57 -04:00
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0x30
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if x . Version != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Version ))
2024-09-05 01:24:57 -04:00
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0x28
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . PublicKey ) > 0 {
i -= len ( x . PublicKey )
copy ( dAtA [ i :], x . PublicKey )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . PublicKey )))
2024-09-05 01:24:57 -04:00
i --
2024-09-11 15:10:54 -04:00
dAtA [ i ] = 0x22
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Protocol ) > 0 {
i -= len ( x . Protocol )
copy ( dAtA [ i :], x . Protocol )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Protocol )))
2024-09-05 01:24:57 -04:00
i --
2024-09-11 15:10:54 -04:00
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
}
}
}
2024-09-05 01:24:57 -04:00
}
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Keyshare )
2024-09-05 01:24:57 -04:00
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
}
2024-09-11 15:10:54 -04:00
}
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 :
2024-09-05 01:24:57 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Payloads" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
var msglen int
2024-09-05 01:24:57 -04:00
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 ++
2024-09-11 15:10:54 -04:00
msglen |= int ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
if msglen < 0 {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + msglen
2024-09-05 01:24:57 -04:00
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
}
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 3 :
2024-09-05 01:24:57 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Protocol" , wireType )
2024-09-05 01:24:57 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Protocol = string ( dAtA [ iNdEx : postIndex ])
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 4 :
2024-09-05 01:24:57 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field PublicKey" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
var byteLen int
2024-09-05 01:24:57 -04:00
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 ++
2024-09-11 15:10:54 -04:00
byteLen |= int ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
if byteLen < 0 {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + byteLen
2024-09-05 01:24:57 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . PublicKey = append ( x . PublicKey [: 0 ], dAtA [ iNdEx : postIndex ] ... )
if x . PublicKey == nil {
x . PublicKey = [] byte {}
}
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 5 :
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Version" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
x . Version = 0
2024-09-05 01:24:57 -04:00
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 ++
2024-09-11 15:10:54 -04:00
x . Version |= uint32 ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
case 6 :
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Role" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
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
}
2024-09-05 01:24:57 -04:00
}
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
}
2024-08-31 12:49:44 -04:00
}
2024-09-05 01:24:57 -04:00
if iNdEx > l {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
2024-08-31 12:49:44 -04:00
}
2024-09-05 01:24:57 -04:00
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 ,
}
}
2024-09-11 15:10:54 -04:00
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
}
2024-09-05 01:24:57 -04:00
var (
2024-09-11 15:10:54 -04:00
md_Permissions protoreflect . MessageDescriptor
fd_Permissions_grants protoreflect . FieldDescriptor
fd_Permissions_scopes protoreflect . FieldDescriptor
2024-09-05 01:24:57 -04:00
)
func init () {
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_Permissions )( nil )
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Permissions Permissions
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_Permissions )( x )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) slowProtoReflect () protoreflect . Message {
mi := & file_did_v1_models_proto_msgTypes [ 4 ]
2024-09-05 01:24:57 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_Permissions_messageType fastReflection_Permissions_messageType
var _ protoreflect . MessageType = fastReflection_Permissions_messageType {}
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Permissions_messageType struct {}
2024-09-05 01:24:57 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Permissions_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_Permissions )( nil )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Permissions_messageType ) New () protoreflect . Message {
return new ( fastReflection_Permissions )
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Permissions_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_Permissions
2024-09-05 01:24:57 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Descriptor () protoreflect . MessageDescriptor {
return md_Permissions
2024-09-05 01:24:57 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Type () protoreflect . MessageType {
return _fastReflection_Permissions_messageType
2024-09-05 01:24:57 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) New () protoreflect . Message {
return new ( fastReflection_Permissions )
2024-09-05 01:24:57 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Interface () protoreflect . ProtoMessage {
return ( * Permissions )( x )
2024-09-05 01:24:57 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
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 ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if len ( x . Scopes ) != 0 {
value := protoreflect . ValueOfList ( & _Permissions_2_list { list : & x . Scopes })
if ! f ( fd_Permissions_scopes , value ) {
2024-09-05 01:24:57 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Permissions.grants" :
return len ( x . Grants ) != 0
case "did.v1.Permissions.scopes" :
return len ( x . Scopes ) != 0
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Permissions.grants" :
x . Grants = nil
case "did.v1.Permissions.scopes" :
x . Scopes = nil
2024-09-05 01:24:57 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , fd . FullName ()))
2024-09-05 01:24:57 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-09-05 01:24:57 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 })
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Permissions" ))
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Permissions does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:19:59 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Permissions" , d . FullName ()))
2024-08-10 17:19:59 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) IsValid () bool {
2024-08-10 17:19:59 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Permissions ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:19:59 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Permissions )
2024-08-10 17:19:59 -04:00
if x == nil {
2024-09-05 01:24:57 -04:00
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
2024-08-10 17:19:59 -04:00
}
}
2024-09-05 01:24:57 -04:00
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
if len ( x . Grants ) > 0 {
l = 0
for _ , e := range x . Grants {
l += runtime . Sov ( uint64 ( e ))
}
n += 1 + runtime . Sov ( uint64 ( l )) + l
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Scopes ) > 0 {
l = 0
for _ , e := range x . Scopes {
l += runtime . Sov ( uint64 ( e ))
}
n += 1 + runtime . Sov ( uint64 ( l )) + l
2024-09-05 01:24:57 -04:00
}
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Permissions )
2024-09-05 01:24:57 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
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 ))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x12
}
2024-09-11 15:10:54 -04:00
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 ))
2024-08-10 17:19:59 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Permissions )
2024-08-10 17:19:59 -04:00
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 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Permissions: wiretype end group for non-group" )
2024-08-10 17:19:59 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Permissions: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:19:59 -04:00
}
switch fieldNum {
case 1 :
2024-09-11 15:10:54 -04:00
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
}
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
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 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-11 15:10:54 -04:00
var elementCount int
if elementCount != 0 && len ( x . Grants ) == 0 {
x . Grants = make ([] DIDNamespace , 0 , elementCount )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
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 )
2024-08-31 12:49:44 -04:00
}
2024-09-05 01:24:57 -04:00
case 2 :
2024-09-11 15:10:54 -04:00
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
}
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
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 {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-11 15:10:54 -04:00
var elementCount int
if elementCount != 0 && len ( x . Scopes ) == 0 {
x . Scopes = make ([] PermissionScope , 0 , elementCount )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
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 )
2024-08-31 12:49:44 -04:00
}
2024-08-10 17:19:59 -04:00
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 (
2024-09-05 01:24:57 -04:00
md_PubKey protoreflect . MessageDescriptor
fd_PubKey_role protoreflect . FieldDescriptor
fd_PubKey_algorithm protoreflect . FieldDescriptor
fd_PubKey_encoding protoreflect . FieldDescriptor
2024-09-07 18:12:58 -04:00
fd_PubKey_curve protoreflect . FieldDescriptor
fd_PubKey_key_type protoreflect . FieldDescriptor
2024-09-05 01:24:57 -04:00
fd_PubKey_raw protoreflect . FieldDescriptor
fd_PubKey_jwk protoreflect . FieldDescriptor
2024-08-10 17:19:59 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-05 01:24:57 -04:00
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" )
2024-09-07 18:12:58 -04:00
fd_PubKey_curve = md_PubKey . Fields (). ByName ( "curve" )
fd_PubKey_key_type = md_PubKey . Fields (). ByName ( "key_type" )
2024-09-05 01:24:57 -04:00
fd_PubKey_raw = md_PubKey . Fields (). ByName ( "raw" )
fd_PubKey_jwk = md_PubKey . Fields (). ByName ( "jwk" )
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
var _ protoreflect . Message = ( * fastReflection_PubKey )( nil )
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
type fastReflection_PubKey PubKey
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
func ( x * PubKey ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_PubKey )( x )
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
func ( x * PubKey ) slowProtoReflect () protoreflect . Message {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 5 ]
2024-08-10 17:19:59 -04:00
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 )
}
2024-09-05 01:24:57 -04:00
var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType
var _ protoreflect . MessageType = fastReflection_PubKey_messageType {}
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
type fastReflection_PubKey_messageType struct {}
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
func ( x fastReflection_PubKey_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_PubKey )( nil )
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
func ( x fastReflection_PubKey_messageType ) New () protoreflect . Message {
return new ( fastReflection_PubKey )
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
func ( x fastReflection_PubKey_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_PubKey
2024-08-10 17:19:59 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Descriptor () protoreflect . MessageDescriptor {
return md_PubKey
2024-08-10 17:19:59 -04:00
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Type () protoreflect . MessageType {
return _fastReflection_PubKey_messageType
2024-08-10 17:19:59 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) New () protoreflect . Message {
return new ( fastReflection_PubKey )
2024-08-10 17:19:59 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Interface () protoreflect . ProtoMessage {
return ( * PubKey )( x )
2024-08-10 17:19:59 -04:00
}
// 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.
2024-09-05 01:24:57 -04:00
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 ) {
2024-08-10 17:19:59 -04:00
return
}
}
2024-09-05 01:24:57 -04:00
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
}
}
2024-09-07 18:12:58 -04:00
if x . Curve != 0 {
value := protoreflect . ValueOfEnum (( protoreflect . EnumNumber )( x . Curve ))
if ! f ( fd_PubKey_curve , value ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-07 18:12:58 -04:00
if x . KeyType != 0 {
value := protoreflect . ValueOfEnum (( protoreflect . EnumNumber )( x . KeyType ))
if ! f ( fd_PubKey_key_type , value ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-07 18:12:58 -04:00
if len ( x . Raw ) != 0 {
value := protoreflect . ValueOfBytes ( x . Raw )
if ! f ( fd_PubKey_raw , value ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-07 18:12:58 -04:00
if x . Jwk != nil {
value := protoreflect . ValueOfMessage ( x . Jwk . ProtoReflect ())
2024-09-05 01:24:57 -04:00
if ! f ( fd_PubKey_jwk , value ) {
2024-08-10 17:19:59 -04:00
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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-05 01:24:57 -04:00
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
2024-09-07 18:12:58 -04:00
case "did.v1.PubKey.curve" :
return x . Curve != 0
case "did.v1.PubKey.key_type" :
return x . KeyType != 0
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
return len ( x . Raw ) != 0
case "did.v1.PubKey.jwk" :
2024-09-07 18:12:58 -04:00
return x . Jwk != nil
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.role" :
x . Role = 0
case "did.v1.PubKey.algorithm" :
x . Algorithm = 0
case "did.v1.PubKey.encoding" :
x . Encoding = 0
2024-09-07 18:12:58 -04:00
case "did.v1.PubKey.curve" :
x . Curve = 0
case "did.v1.PubKey.key_type" :
x . KeyType = 0
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
x . Raw = nil
case "did.v1.PubKey.jwk" :
x . Jwk = nil
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch descriptor . FullName () {
2024-09-05 01:24:57 -04:00
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 ))
2024-09-07 18:12:58 -04:00
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 ))
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
value := x . Raw
return protoreflect . ValueOfBytes ( value )
case "did.v1.PubKey.jwk" :
2024-09-07 18:12:58 -04:00
value := x . Jwk
return protoreflect . ValueOfMessage ( value . ProtoReflect ())
2024-08-10 17:19:59 -04:00
default :
if descriptor . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-05 01:24:57 -04:00
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 ())
2024-09-07 18:12:58 -04:00
case "did.v1.PubKey.curve" :
x . Curve = ( KeyCurve )( value . Enum ())
case "did.v1.PubKey.key_type" :
x . KeyType = ( KeyType )( value . Enum ())
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
x . Raw = value . Bytes ()
case "did.v1.PubKey.jwk" :
2024-09-11 15:10:54 -04:00
x . Jwk = value . Message (). Interface ().( * PubKey_JWK )
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.jwk" :
if x . Jwk == nil {
2024-09-11 15:10:54 -04:00
x . Jwk = new ( PubKey_JWK )
2024-08-31 12:49:44 -04:00
}
2024-09-07 18:12:58 -04:00
return protoreflect . ValueOfMessage ( x . Jwk . ProtoReflect ())
2024-09-05 01:24:57 -04:00
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" ))
2024-09-07 18:12:58 -04:00
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" ))
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
panic ( fmt . Errorf ( "field raw of message did.v1.PubKey is not mutable" ))
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:19:59 -04:00
switch fd . FullName () {
2024-09-05 01:24:57 -04:00
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 )
2024-09-07 18:12:58 -04:00
case "did.v1.PubKey.curve" :
return protoreflect . ValueOfEnum ( 0 )
case "did.v1.PubKey.key_type" :
return protoreflect . ValueOfEnum ( 0 )
2024-09-05 01:24:57 -04:00
case "did.v1.PubKey.raw" :
return protoreflect . ValueOfBytes ( nil )
case "did.v1.PubKey.jwk" :
2024-09-11 15:10:54 -04:00
m := new ( PubKey_JWK )
2024-09-07 18:12:58 -04:00
return protoreflect . ValueOfMessage ( m . ProtoReflect ())
2024-08-10 17:19:59 -04:00
default :
if fd . IsExtension () {
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey" ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey does not contain field %s" , fd . FullName ()))
2024-08-10 17:19:59 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:19:59 -04:00
switch d . FullName () {
default :
2024-09-05 01:24:57 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.PubKey" , d . FullName ()))
2024-08-10 17:19:59 -04:00
}
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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:19:59 -04:00
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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:19:59 -04:00
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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) IsValid () bool {
2024-08-10 17:19:59 -04:00
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.
2024-09-05 01:24:57 -04:00
func ( x * fastReflection_PubKey ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:19:59 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-05 01:24:57 -04:00
x := input . Message . Interface ().( * PubKey )
2024-08-10 17:19:59 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-05 01:24:57 -04:00
if x . Role != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Role ))
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
if x . Algorithm != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Algorithm ))
}
if x . Encoding != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Encoding ))
}
2024-09-07 18:12:58 -04:00
if x . Curve != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Curve ))
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
if x . KeyType != 0 {
n += 1 + runtime . Sov ( uint64 ( x . KeyType ))
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
l = len ( x . Raw )
2024-09-05 01:24:57 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-07 18:12:58 -04:00
if x . Jwk != nil {
l = options . Size ( x . Jwk )
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:19:59 -04:00
}
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
2024-09-05 01:24:57 -04:00
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 )
}
2024-09-07 18:12:58 -04:00
if x . Jwk != nil {
encoded , err := options . Marshal ( x . Jwk )
if err != nil {
return protoiface . MarshalOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Buf : input . Buf ,
}, err
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
i -= len ( encoded )
copy ( dAtA [ i :], encoded )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( encoded )))
2024-09-05 01:24:57 -04:00
i --
2024-09-07 18:12:58 -04:00
dAtA [ i ] = 0x3a
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
if len ( x . Raw ) > 0 {
i -= len ( x . Raw )
copy ( dAtA [ i :], x . Raw )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Raw )))
i --
2024-09-07 18:12:58 -04:00
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
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
if x . Encoding != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Encoding ))
i --
dAtA [ i ] = 0x18
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
if x . Algorithm != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Algorithm ))
2024-08-10 17:19:59 -04:00
i --
2024-09-05 01:24:57 -04:00
dAtA [ i ] = 0x10
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
if x . Role != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Role ))
2024-08-10 17:19:59 -04:00
i --
2024-09-05 01:24:57 -04:00
dAtA [ i ] = 0x8
2024-08-10 17:19:59 -04:00
}
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 ) {
2024-09-05 01:24:57 -04:00
x := input . Message . Interface ().( * PubKey )
2024-08-10 17:19:59 -04:00
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
}
2024-09-05 01:24:57 -04:00
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 :
2024-09-07 18:12:58 -04:00
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Curve" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
x . Curve = 0
2024-09-05 01:24:57 -04:00
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 ++
2024-09-07 18:12:58 -04:00
x . Curve |= KeyCurve ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
case 5 :
2024-09-07 18:12:58 -04:00
if wireType != 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field KeyType" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
x . KeyType = 0
2024-09-05 01:24:57 -04:00
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 ++
2024-09-07 18:12:58 -04:00
x . KeyType |= KeyType ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
case 6 :
if wireType != 2 {
2024-09-07 18:12:58 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Raw" , wireType )
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
var byteLen int
2024-09-05 01:24:57 -04:00
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 ++
2024-09-07 18:12:58 -04:00
byteLen |= int ( b & 0x7F ) << shift
2024-09-05 01:24:57 -04:00
if b < 0x80 {
break
}
}
2024-09-07 18:12:58 -04:00
if byteLen < 0 {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-07 18:12:58 -04:00
postIndex := iNdEx + byteLen
2024-09-05 01:24:57 -04:00
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
}
2024-09-07 18:12:58 -04:00
x . Raw = append ( x . Raw [: 0 ], dAtA [ iNdEx : postIndex ] ... )
if x . Raw == nil {
x . Raw = [] byte {}
}
2024-09-05 01:24:57 -04:00
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 {
2024-08-10 17:19:59 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-05 01:24:57 -04:00
if x . Jwk == nil {
2024-09-11 15:10:54 -04:00
x . Jwk = & PubKey_JWK {}
2024-08-10 17:19:59 -04:00
}
2024-09-07 18:12:58 -04:00
if err := options . Unmarshal ( dAtA [ iNdEx : postIndex ], x . Jwk ); err != nil {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, err
2024-08-10 17:19:59 -04:00
}
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-08-10 17:19:59 -04:00
default :
iNdEx = preIndex
skippy , err := runtime . Skip ( dAtA [ iNdEx :])
if err != nil {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, err
}
2024-09-05 01:24:57 -04:00
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
}
}
2024-08-10 17:19:59 -04:00
2024-09-05 01:24:57 -04:00
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 ,
2024-08-31 12:49:44 -04:00
}
2024-08-10 17:01:14 -04:00
}
var (
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_PubKey_JWK )( nil )
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_PubKey_JWK PubKey_JWK
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_PubKey_JWK )( x )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) slowProtoReflect () protoreflect . Message {
2024-09-14 12:47:25 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 12 ]
2024-08-10 17:01:14 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_PubKey_JWK_messageType fastReflection_PubKey_JWK_messageType
var _ protoreflect . MessageType = fastReflection_PubKey_JWK_messageType {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_PubKey_JWK_messageType struct {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_PubKey_JWK_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_PubKey_JWK )( nil )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_PubKey_JWK_messageType ) New () protoreflect . Message {
return new ( fastReflection_PubKey_JWK )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_PubKey_JWK_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_PubKey_JWK
2024-08-10 17:01:14 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Descriptor () protoreflect . MessageDescriptor {
return md_PubKey_JWK
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Type () protoreflect . MessageType {
return _fastReflection_PubKey_JWK_messageType
2024-08-10 17:01:14 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) New () protoreflect . Message {
return new ( fastReflection_PubKey_JWK )
2024-08-10 17:01:14 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Interface () protoreflect . ProtoMessage {
return ( * PubKey_JWK )( x )
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Crv != "" {
value := protoreflect . ValueOfString ( x . Crv )
if ! f ( fd_PubKey_JWK_crv , value ) {
2024-08-31 12:49:44 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . X != "" {
value := protoreflect . ValueOfString ( x . X )
if ! f ( fd_PubKey_JWK_x , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Y != "" {
value := protoreflect . ValueOfString ( x . Y )
if ! f ( fd_PubKey_JWK_y , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . N != "" {
value := protoreflect . ValueOfString ( x . N )
if ! f ( fd_PubKey_JWK_n , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . E != "" {
value := protoreflect . ValueOfString ( x . E )
if ! f ( fd_PubKey_JWK_e , value ) {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 != ""
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 = ""
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.PubKey.JWK.kty" :
value := x . Kty
2024-08-31 12:49:44 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.PubKey.JWK.crv" :
value := x . Crv
2024-08-10 17:01:14 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-08-10 17:01:14 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.PubKey.JWK.kty" :
2024-08-10 17:01:14 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.PubKey.JWK.crv" :
2024-08-31 12:49:44 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
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" :
2024-08-31 12:49:44 -04:00
return protoreflect . ValueOfString ( "" )
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.PubKey.JWK" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.PubKey.JWK does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:01:14 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.PubKey.JWK" , d . FullName ()))
2024-08-10 17:01:14 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) IsValid () bool {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_PubKey_JWK ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:01:14 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * PubKey_JWK )
2024-08-10 17:01:14 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
l = len ( x . Kty )
2024-08-10 17:01:14 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . Crv )
2024-08-31 12:49:44 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . X )
2024-08-31 12:49:44 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-09-11 15:10:54 -04:00
}
l = len ( x . Y )
if l > 0 {
2024-09-05 01:24:57 -04:00
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
l = len ( x . N )
if l > 0 {
2024-09-05 01:24:57 -04:00
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
l = len ( x . E )
if l > 0 {
2024-08-31 12:49:44 -04:00
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:01:14 -04:00
}
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * PubKey_JWK )
2024-08-10 17:01:14 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
if len ( x . E ) > 0 {
i -= len ( x . E )
copy ( dAtA [ i :], x . E )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . E )))
2024-08-10 17:19:59 -04:00
i --
2024-08-31 12:49:44 -04:00
dAtA [ i ] = 0x32
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . N ) > 0 {
i -= len ( x . N )
copy ( dAtA [ i :], x . N )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . N )))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x2a
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Y ) > 0 {
i -= len ( x . Y )
copy ( dAtA [ i :], x . Y )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Y )))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x22
}
2024-09-11 15:10:54 -04:00
if len ( x . X ) > 0 {
i -= len ( x . X )
copy ( dAtA [ i :], x . X )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . X )))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x1a
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Crv ) > 0 {
i -= len ( x . Crv )
copy ( dAtA [ i :], x . Crv )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Crv )))
2024-08-31 12:49:44 -04:00
i --
dAtA [ i ] = 0x12
}
2024-09-11 15:10:54 -04:00
if len ( x . Kty ) > 0 {
i -= len ( x . Kty )
copy ( dAtA [ i :], x . Kty )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Kty )))
2024-08-10 17:01:14 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * PubKey_JWK )
2024-08-10 17:01:14 -04:00
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 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: PubKey_JWK: wiretype end group for non-group" )
2024-08-10 17:01:14 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: PubKey_JWK: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:01:14 -04:00
}
switch fieldNum {
case 1 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Kty" , wireType )
2024-08-10 17:01:14 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Kty = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:01:14 -04:00
iNdEx = postIndex
case 2 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Crv" , wireType )
2024-08-31 12:49:44 -04:00
}
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
}
2024-09-11 15:10:54 -04:00
x . Crv = string ( dAtA [ iNdEx : postIndex ])
2024-08-31 12:49:44 -04:00
iNdEx = postIndex
case 3 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field X" , wireType )
2024-08-10 17:01:14 -04:00
}
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 ++
2024-08-31 12:49:44 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . X = string ( dAtA [ iNdEx : postIndex ])
2024-08-31 12:49:44 -04:00
iNdEx = postIndex
case 4 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Y" , wireType )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
2024-08-31 12:49:44 -04:00
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 ++
2024-09-11 15:10:54 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-31 12:49:44 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + intStringLen
2024-08-31 12:49:44 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . Y = string ( dAtA [ iNdEx : postIndex ])
2024-08-31 12:49:44 -04:00
iNdEx = postIndex
case 5 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field N" , wireType )
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
2024-08-31 12:49:44 -04:00
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 ++
2024-09-11 15:10:54 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-10 17:01:14 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + intStringLen
2024-08-10 17:01:14 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . N = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:01:14 -04:00
iNdEx = postIndex
2024-08-31 12:49:44 -04:00
case 6 :
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field E" , wireType )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var stringLen uint64
2024-08-10 17:01:14 -04:00
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 ++
2024-09-11 15:10:54 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-10 17:01:14 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + intStringLen
2024-08-31 12:49:44 -04:00
if postIndex < 0 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
2024-08-10 17:01:14 -04:00
}
2024-08-31 12:49:44 -04:00
if postIndex > l {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-09-11 15:10:54 -04:00
x . E = string ( dAtA [ iNdEx : postIndex ])
2024-08-31 12:49:44 -04:00
iNdEx = postIndex
2024-08-10 17:01:14 -04:00
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 ,
}
}
2024-09-11 15:10:54 -04:00
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
}
2024-08-10 17:01:14 -04:00
var (
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_Service )( nil )
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Service Service
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x * Service ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_Service )( x )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Service ) slowProtoReflect () protoreflect . Message {
mi := & file_did_v1_models_proto_msgTypes [ 6 ]
2024-08-10 17:01:14 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_Service_messageType fastReflection_Service_messageType
var _ protoreflect . MessageType = fastReflection_Service_messageType {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_Service_messageType struct {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Service_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_Service )( nil )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Service_messageType ) New () protoreflect . Message {
return new ( fastReflection_Service )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_Service_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_Service
2024-08-10 17:01:14 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Descriptor () protoreflect . MessageDescriptor {
return md_Service
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Type () protoreflect . MessageType {
return _fastReflection_Service_messageType
2024-08-10 17:01:14 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) New () protoreflect . Message {
return new ( fastReflection_Service )
2024-08-10 17:01:14 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Interface () protoreflect . ProtoMessage {
return ( * Service )( x )
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Range ( f func ( protoreflect . FieldDescriptor , protoreflect . Value ) bool ) {
2024-09-05 01:24:57 -04:00
if x . Id != "" {
value := protoreflect . ValueOfString ( x . Id )
2024-09-11 15:10:54 -04:00
if ! f ( fd_Service_id , value ) {
2024-09-05 01:24:57 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . ServiceType != "" {
value := protoreflect . ValueOfString ( x . ServiceType )
if ! f ( fd_Service_service_type , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Service.id" :
2024-09-05 01:24:57 -04:00
return x . Id != ""
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Service.id" :
2024-09-05 01:24:57 -04:00
x . Id = ""
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Service.id" :
2024-09-05 01:24:57 -04:00
value := x . Id
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.Service.service_type" :
value := x . ServiceType
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
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 ())
2024-08-10 17:01:14 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Service.id" :
2024-09-05 01:24:57 -04:00
x . Id = value . Interface ().( string )
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.Service.id" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.Service.service_type" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
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 ())
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.Service" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.Service does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:01:14 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.Service" , d . FullName ()))
2024-08-10 17:01:14 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) IsValid () bool {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_Service ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:01:14 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Service )
2024-08-10 17:01:14 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-05 01:24:57 -04:00
l = len ( x . Id )
2024-08-10 17:01:14 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . ServiceType )
2024-09-05 01:24:57 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:01:14 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
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 ))
}
2024-08-10 17:01:14 -04:00
if x . unknownFields != nil {
n += len ( x . unknownFields )
}
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : n ,
}
}
marshal := func ( input protoiface . MarshalInput ) ( protoiface . MarshalOutput , error ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Service )
2024-08-10 17:01:14 -04:00
if x == nil {
return protoiface . MarshalOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Buf : input . Buf ,
}, nil
}
2024-09-11 15:10:54 -04:00
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
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Authority ) > 0 {
i -= len ( x . Authority )
copy ( dAtA [ i :], x . Authority )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Authority )))
2024-09-05 01:24:57 -04:00
i --
dAtA [ i ] = 0x1a
}
2024-09-11 15:10:54 -04:00
if len ( x . ServiceType ) > 0 {
i -= len ( x . ServiceType )
copy ( dAtA [ i :], x . ServiceType )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . ServiceType )))
2024-08-10 17:01:14 -04:00
i --
dAtA [ i ] = 0x12
}
2024-09-05 01:24:57 -04:00
if len ( x . Id ) > 0 {
i -= len ( x . Id )
copy ( dAtA [ i :], x . Id )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Id )))
2024-08-10 17:01:14 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * Service )
2024-08-10 17:01:14 -04:00
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 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Service: wiretype end group for non-group" )
2024-08-10 17:01:14 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: Service: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:01:14 -04:00
}
switch fieldNum {
case 1 :
if wireType != 2 {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Id" , wireType )
2024-08-10 17:01:14 -04:00
}
2024-09-05 01:24:57 -04:00
var stringLen uint64
2024-08-10 17:01:14 -04:00
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 ++
2024-09-05 01:24:57 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-10 17:01:14 -04:00
if b < 0x80 {
break
}
}
2024-09-05 01:24:57 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-05 01:24:57 -04:00
postIndex := iNdEx + intStringLen
2024-08-10 17:01:14 -04:00
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
}
2024-09-05 01:24:57 -04:00
x . Id = string ( dAtA [ iNdEx : postIndex ])
2024-08-10 17:01:14 -04:00
iNdEx = postIndex
2024-08-31 12:49:44 -04:00
case 2 :
2024-08-10 17:01:14 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
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 )
2024-09-05 01:24:57 -04:00
}
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
}
}
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-09-11 15:10:54 -04:00
case 7 :
2024-09-05 01:24:57 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Permissions" , wireType )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var msglen int
2024-08-10 17:01:14 -04:00
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 ++
2024-09-11 15:10:54 -04:00
msglen |= int ( b & 0x7F ) << shift
2024-08-10 17:01:14 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
if msglen < 0 {
2024-08-10 17:01:14 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-11 15:10:54 -04:00
postIndex := iNdEx + msglen
2024-08-10 17:01:14 -04:00
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
}
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
}
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 (
2024-09-11 15:10:54 -04:00
md_ServiceInfo protoreflect . MessageDescriptor
fd_ServiceInfo_exists protoreflect . FieldDescriptor
fd_ServiceInfo_origin protoreflect . FieldDescriptor
fd_ServiceInfo_fingerprint protoreflect . FieldDescriptor
fd_ServiceInfo_service protoreflect . FieldDescriptor
2024-08-10 17:01:14 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-11 15:10:54 -04:00
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" )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
var _ protoreflect . Message = ( * fastReflection_ServiceInfo )( nil )
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_ServiceInfo ServiceInfo
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x * ServiceInfo ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_ServiceInfo )( x )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * ServiceInfo ) slowProtoReflect () protoreflect . Message {
mi := & file_did_v1_models_proto_msgTypes [ 7 ]
2024-08-10 17:01:14 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
var _fastReflection_ServiceInfo_messageType fastReflection_ServiceInfo_messageType
var _ protoreflect . MessageType = fastReflection_ServiceInfo_messageType {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
type fastReflection_ServiceInfo_messageType struct {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
func ( x fastReflection_ServiceInfo_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_ServiceInfo )( nil )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_ServiceInfo_messageType ) New () protoreflect . Message {
return new ( fastReflection_ServiceInfo )
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x fastReflection_ServiceInfo_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_ServiceInfo
2024-08-10 17:01:14 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Descriptor () protoreflect . MessageDescriptor {
return md_ServiceInfo
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Type () protoreflect . MessageType {
return _fastReflection_ServiceInfo_messageType
2024-08-10 17:01:14 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) New () protoreflect . Message {
return new ( fastReflection_ServiceInfo )
2024-08-10 17:01:14 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Interface () protoreflect . ProtoMessage {
return ( * ServiceInfo )( x )
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
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 ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Origin != "" {
value := protoreflect . ValueOfString ( x . Origin )
if ! f ( fd_ServiceInfo_origin , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Fingerprint != "" {
value := protoreflect . ValueOfString ( x . Fingerprint )
if ! f ( fd_ServiceInfo_fingerprint , value ) {
2024-08-10 17:01:14 -04:00
return
}
}
2024-09-11 15:10:54 -04:00
if x . Service != nil {
value := protoreflect . ValueOfMessage ( x . Service . ProtoReflect ())
if ! f ( fd_ServiceInfo_service , value ) {
2024-08-31 12:49:44 -04:00
return
}
}
2024-08-10 17:01:14 -04:00
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch descriptor . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.exists" :
value := x . Exists
return protoreflect . ValueOfBool ( value )
case "did.v1.ServiceInfo.origin" :
value := x . Origin
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.fingerprint" :
value := x . Fingerprint
2024-09-07 18:12:58 -04:00
return protoreflect . ValueOfString ( value )
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.service" :
value := x . Service
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfMessage ( value . ProtoReflect ())
2024-08-10 17:01:14 -04:00
default :
if descriptor . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , descriptor . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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 )
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
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" ))
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-08-10 17:01:14 -04:00
switch fd . FullName () {
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.exists" :
return protoreflect . ValueOfBool ( false )
case "did.v1.ServiceInfo.origin" :
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.fingerprint" :
2024-09-07 18:12:58 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-11 15:10:54 -04:00
case "did.v1.ServiceInfo.service" :
m := new ( Service )
2024-09-05 01:24:57 -04:00
return protoreflect . ValueOfMessage ( m . ProtoReflect ())
2024-08-10 17:01:14 -04:00
default :
if fd . IsExtension () {
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ServiceInfo" ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "message did.v1.ServiceInfo does not contain field %s" , fd . FullName ()))
2024-08-10 17:01:14 -04:00
}
}
// 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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-08-10 17:01:14 -04:00
switch d . FullName () {
default :
2024-09-11 15:10:54 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.ServiceInfo" , d . FullName ()))
2024-08-10 17:01:14 -04:00
}
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) GetUnknown () protoreflect . RawFields {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) SetUnknown ( fields protoreflect . RawFields ) {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) IsValid () bool {
2024-08-10 17:01:14 -04:00
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.
2024-09-11 15:10:54 -04:00
func ( x * fastReflection_ServiceInfo ) ProtoMethods () * protoiface . Methods {
2024-08-10 17:01:14 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * ServiceInfo )
2024-08-10 17:01:14 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-11 15:10:54 -04:00
if x . Exists {
n += 2
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
l = len ( x . Origin )
2024-08-10 17:01:14 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-11 15:10:54 -04:00
l = len ( x . Fingerprint )
2024-09-07 18:12:58 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if x . Service != nil {
l = options . Size ( x . Service )
2024-08-10 17:01:14 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * ServiceInfo )
2024-08-10 17:01:14 -04:00
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 )
}
2024-09-11 15:10:54 -04:00
if x . Service != nil {
encoded , err := options . Marshal ( x . Service )
2024-09-05 01:24:57 -04:00
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 )))
2024-08-10 17:01:14 -04:00
i --
2024-09-07 18:12:58 -04:00
dAtA [ i ] = 0x22
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Fingerprint ) > 0 {
i -= len ( x . Fingerprint )
copy ( dAtA [ i :], x . Fingerprint )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Fingerprint )))
2024-08-10 17:01:14 -04:00
i --
2024-09-07 18:12:58 -04:00
dAtA [ i ] = 0x1a
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
if len ( x . Origin ) > 0 {
i -= len ( x . Origin )
copy ( dAtA [ i :], x . Origin )
i = runtime . EncodeVarint ( dAtA , i , uint64 ( len ( x . Origin )))
2024-08-10 17:01:14 -04:00
i --
2024-09-07 18:12:58 -04:00
dAtA [ i ] = 0x12
}
2024-09-11 15:10:54 -04:00
if x . Exists {
i --
if x . Exists {
dAtA [ i ] = 1
} else {
dAtA [ i ] = 0
}
2024-09-07 18:12:58 -04:00
i --
dAtA [ i ] = 0x8
2024-08-10 17:01:14 -04:00
}
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 ) {
2024-09-11 15:10:54 -04:00
x := input . Message . Interface ().( * ServiceInfo )
2024-08-10 17:01:14 -04:00
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 {
2024-07-05 22:20:13 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
2024-08-10 17:01:14 -04:00
b := dAtA [ iNdEx ]
iNdEx ++
wire |= uint64 ( b & 0x7F ) << shift
if b < 0x80 {
break
2024-07-05 22:20:13 -04:00
}
2024-08-10 17:01:14 -04:00
}
fieldNum := int32 ( wire >> 3 )
wireType := int ( wire & 0x7 )
if wireType == 4 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: ServiceInfo: wiretype end group for non-group" )
2024-08-10 17:01:14 -04:00
}
if fieldNum <= 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: ServiceInfo: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-08-10 17:01:14 -04:00
}
switch fieldNum {
case 1 :
2024-09-07 18:12:58 -04:00
if wireType != 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Exists" , wireType )
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
var v int
2024-09-07 18:12:58 -04:00
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 ++
2024-09-11 15:10:54 -04:00
v |= int ( b & 0x7F ) << shift
2024-09-07 18:12:58 -04:00
if b < 0x80 {
break
}
}
2024-09-11 15:10:54 -04:00
x . Exists = bool ( v != 0 )
2024-09-07 18:12:58 -04:00
case 2 :
2024-09-05 01:24:57 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Origin" , wireType )
2024-07-05 22:20:13 -04:00
}
2024-09-05 01:24:57 -04:00
var stringLen uint64
2024-07-05 22:20:13 -04:00
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 ++
2024-09-05 01:24:57 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-07-05 22:20:13 -04:00
if b < 0x80 {
break
}
}
2024-09-05 01:24:57 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . Origin = string ( dAtA [ iNdEx : postIndex ])
2024-09-05 01:24:57 -04:00
iNdEx = postIndex
2024-09-07 18:12:58 -04:00
case 3 :
2024-07-05 22:20:13 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Fingerprint" , wireType )
2024-07-05 22:20:13 -04:00
}
2024-09-05 01:24:57 -04:00
var stringLen uint64
2024-07-05 22:20:13 -04:00
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 ++
2024-09-05 01:24:57 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-07-05 22:20:13 -04:00
if b < 0x80 {
break
}
}
2024-09-05 01:24:57 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-07-05 22:20:13 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-05 01:24:57 -04:00
postIndex := iNdEx + intStringLen
2024-07-05 22:20:13 -04:00
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
}
2024-09-11 15:10:54 -04:00
x . Fingerprint = string ( dAtA [ iNdEx : postIndex ])
2024-07-05 22:20:13 -04:00
iNdEx = postIndex
2024-09-05 01:24:57 -04:00
case 4 :
2024-07-05 22:20:13 -04:00
if wireType != 2 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Service" , wireType )
2024-07-05 22:20:13 -04:00
}
2024-08-31 12:49:44 -04:00
var msglen int
2024-07-05 22:20:13 -04:00
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 ++
2024-08-31 12:49:44 -04:00
msglen |= int ( b & 0x7F ) << shift
2024-07-05 22:20:13 -04:00
if b < 0x80 {
break
}
}
2024-08-31 12:49:44 -04:00
if msglen < 0 {
2024-07-05 22:20:13 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-08-31 12:49:44 -04:00
postIndex := iNdEx + msglen
2024-07-05 22:20:13 -04:00
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
}
2024-09-11 15:10:54 -04:00
if x . Service == nil {
x . Service = & Service {}
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
if err := options . Unmarshal ( dAtA [ iNdEx : postIndex ], x . Service ); err != nil {
2024-09-05 01:24:57 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, err
2024-08-31 12:49:44 -04:00
}
2024-07-05 22:20:13 -04:00
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 (
2024-09-14 12:47:25 -04:00
md_FirstPartyCaveat protoreflect . MessageDescriptor
fd_FirstPartyCaveat_scope protoreflect . FieldDescriptor
fd_FirstPartyCaveat_exp protoreflect . FieldDescriptor
fd_FirstPartyCaveat_cnf protoreflect . FieldDescriptor
fd_FirstPartyCaveat_aud protoreflect . FieldDescriptor
2024-07-05 22:20:13 -04:00
)
func init () {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_init ()
2024-09-14 12:47:25 -04:00
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" )
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
var _ protoreflect . Message = ( * fastReflection_FirstPartyCaveat )( nil )
2024-07-05 22:20:13 -04:00
2024-09-14 12:47:25 -04:00
type fastReflection_FirstPartyCaveat FirstPartyCaveat
2024-07-05 22:20:13 -04:00
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) ProtoReflect () protoreflect . Message {
return ( * fastReflection_FirstPartyCaveat )( x )
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) slowProtoReflect () protoreflect . Message {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 8 ]
2024-07-05 22:20:13 -04:00
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 )
}
2024-09-14 12:47:25 -04:00
var _fastReflection_FirstPartyCaveat_messageType fastReflection_FirstPartyCaveat_messageType
var _ protoreflect . MessageType = fastReflection_FirstPartyCaveat_messageType {}
2024-07-05 22:20:13 -04:00
2024-09-14 12:47:25 -04:00
type fastReflection_FirstPartyCaveat_messageType struct {}
2024-07-05 22:20:13 -04:00
2024-09-14 12:47:25 -04:00
func ( x fastReflection_FirstPartyCaveat_messageType ) Zero () protoreflect . Message {
return ( * fastReflection_FirstPartyCaveat )( nil )
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
func ( x fastReflection_FirstPartyCaveat_messageType ) New () protoreflect . Message {
return new ( fastReflection_FirstPartyCaveat )
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
func ( x fastReflection_FirstPartyCaveat_messageType ) Descriptor () protoreflect . MessageDescriptor {
return md_FirstPartyCaveat
2024-07-05 22:20:13 -04:00
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_FirstPartyCaveat ) Descriptor () protoreflect . MessageDescriptor {
return md_FirstPartyCaveat
2024-07-05 22:20:13 -04:00
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_FirstPartyCaveat ) Type () protoreflect . MessageType {
return _fastReflection_FirstPartyCaveat_messageType
2024-07-05 22:20:13 -04:00
}
// New returns a newly allocated and mutable empty message.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_FirstPartyCaveat ) New () protoreflect . Message {
return new ( fastReflection_FirstPartyCaveat )
2024-07-05 22:20:13 -04:00
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_FirstPartyCaveat ) Interface () protoreflect . ProtoMessage {
return ( * FirstPartyCaveat )( x )
2024-07-05 22:20:13 -04:00
}
// 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.
2024-09-14 12:47:25 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
return
}
}
2024-09-14 12:47:25 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
return
}
}
2024-09-14 12:47:25 -04:00
if x . Aud != "" {
value := protoreflect . ValueOfString ( x . Aud )
if ! f ( fd_ThirdPartyCaveat_aud , value ) {
2024-07-05 22:20:13 -04:00
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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) Has ( fd protoreflect . FieldDescriptor ) bool {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-14 12:47:25 -04:00
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 != ""
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) Clear ( fd protoreflect . FieldDescriptor ) {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-14 12:47:25 -04:00
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 = ""
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) Get ( descriptor protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch descriptor . FullName () {
2024-09-14 12:47:25 -04:00
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
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfString ( value )
2024-09-14 12:47:25 -04:00
case "did.v1.ThirdPartyCaveat.aud" :
value := x . Aud
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfString ( value )
2024-07-05 22:20:13 -04:00
default :
if descriptor . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , descriptor . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-05 01:24:57 -04:00
//
// Set is a mutating operation and unsafe for concurrent use.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) Set ( fd protoreflect . FieldDescriptor , value protoreflect . Value ) {
2024-09-05 01:24:57 -04:00
switch fd . FullName () {
2024-09-14 12:47:25 -04:00
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 )
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) Mutable ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-14 12:47:25 -04:00
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" ))
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) NewField ( fd protoreflect . FieldDescriptor ) protoreflect . Value {
2024-07-05 22:20:13 -04:00
switch fd . FullName () {
2024-09-14 12:47:25 -04:00
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" :
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfString ( "" )
2024-09-14 12:47:25 -04:00
case "did.v1.ThirdPartyCaveat.aud" :
2024-09-11 15:10:54 -04:00
return protoreflect . ValueOfString ( "" )
2024-07-05 22:20:13 -04:00
default :
if fd . IsExtension () {
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "proto3 declared messages do not support extensions: did.v1.ThirdPartyCaveat" ))
2024-07-05 22:20:13 -04:00
}
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "message did.v1.ThirdPartyCaveat does not contain field %s" , fd . FullName ()))
2024-07-05 22:20:13 -04:00
}
}
// 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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) WhichOneof ( d protoreflect . OneofDescriptor ) protoreflect . FieldDescriptor {
2024-07-05 22:20:13 -04:00
switch d . FullName () {
default :
2024-09-14 12:47:25 -04:00
panic ( fmt . Errorf ( "%s is not a oneof field in did.v1.ThirdPartyCaveat" , d . FullName ()))
2024-07-05 22:20:13 -04:00
}
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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) GetUnknown () protoreflect . RawFields {
2024-07-05 22:20:13 -04:00
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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) SetUnknown ( fields protoreflect . RawFields ) {
2024-07-05 22:20:13 -04:00
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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) IsValid () bool {
2024-07-05 22:20:13 -04:00
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.
2024-09-14 12:47:25 -04:00
func ( x * fastReflection_ThirdPartyCaveat ) ProtoMethods () * protoiface . Methods {
2024-07-05 22:20:13 -04:00
size := func ( input protoiface . SizeInput ) protoiface . SizeOutput {
2024-09-14 12:47:25 -04:00
x := input . Message . Interface ().( * ThirdPartyCaveat )
2024-07-05 22:20:13 -04:00
if x == nil {
return protoiface . SizeOutput {
NoUnkeyedLiterals : input . NoUnkeyedLiterals ,
Size : 0 ,
}
}
options := runtime . SizeInputToOptions ( input )
_ = options
var n int
var l int
_ = l
2024-09-14 12:47:25 -04:00
if x . Scope != nil {
l = options . Size ( x . Scope )
2024-09-11 15:10:54 -04:00
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-14 12:47:25 -04:00
if x . Exp != 0 {
n += 1 + runtime . Sov ( uint64 ( x . Exp ))
}
l = len ( x . Cnf )
2024-09-11 15:10:54 -04:00
if l > 0 {
n += 1 + l + runtime . Sov ( uint64 ( l ))
}
2024-09-14 12:47:25 -04:00
l = len ( x . Aud )
2024-07-05 22:20:13 -04:00
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 ) {
2024-09-14 12:47:25 -04:00
x := input . Message . Interface ().( * ThirdPartyCaveat )
2024-07-05 22:20:13 -04:00
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 )
}
2024-09-14 12:47:25 -04:00
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 )))
2024-09-11 15:10:54 -04:00
i --
dAtA [ i ] = 0x1a
}
2024-09-14 12:47:25 -04:00
if x . Exp != 0 {
i = runtime . EncodeVarint ( dAtA , i , uint64 ( x . Exp ))
2024-09-11 15:10:54 -04:00
i --
2024-09-14 12:47:25 -04:00
dAtA [ i ] = 0x10
2024-09-11 15:10:54 -04:00
}
2024-09-14 12:47:25 -04:00
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 )))
2024-07-05 22:20:13 -04:00
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 ) {
2024-09-14 12:47:25 -04:00
x := input . Message . Interface ().( * ThirdPartyCaveat )
2024-07-05 22:20:13 -04:00
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 {
2024-09-14 12:47:25 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: ThirdPartyCaveat: wiretype end group for non-group" )
2024-07-05 22:20:13 -04:00
}
if fieldNum <= 0 {
2024-09-14 12:47:25 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: ThirdPartyCaveat: illegal tag %d (wire type %d)" , fieldNum , wire )
2024-07-05 22:20:13 -04:00
}
switch fieldNum {
case 1 :
if wireType != 2 {
2024-09-14 12:47:25 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Scope" , wireType )
2024-09-11 15:10:54 -04:00
}
2024-09-14 12:47:25 -04:00
var msglen int
2024-09-11 15:10:54 -04:00
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 ++
2024-09-14 12:47:25 -04:00
msglen |= int ( b & 0x7F ) << shift
2024-09-11 15:10:54 -04:00
if b < 0x80 {
break
}
}
2024-09-14 12:47:25 -04:00
if msglen < 0 {
2024-09-11 15:10:54 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-14 12:47:25 -04:00
postIndex := iNdEx + msglen
2024-09-11 15:10:54 -04:00
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
}
2024-09-14 12:47:25 -04:00
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
}
2024-09-11 15:10:54 -04:00
iNdEx = postIndex
case 2 :
2024-09-14 12:47:25 -04:00
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 :
2024-09-11 15:10:54 -04:00
if wireType != 2 {
2024-09-14 12:47:25 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Cnf" , wireType )
2024-09-11 15:10:54 -04:00
}
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
}
2024-09-14 12:47:25 -04:00
x . Cnf = string ( dAtA [ iNdEx : postIndex ])
2024-09-11 15:10:54 -04:00
iNdEx = postIndex
2024-09-14 12:47:25 -04:00
case 4 :
2024-09-11 15:10:54 -04:00
if wireType != 2 {
2024-09-14 12:47:25 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, fmt . Errorf ( "proto: wrong wireType = %d for field Aud" , wireType )
2024-08-31 12:49:44 -04:00
}
2024-09-14 12:47:25 -04:00
var stringLen uint64
2024-08-31 12:49:44 -04:00
for shift := uint ( 0 ); ; shift += 7 {
if shift >= 64 {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrIntOverflow
2024-07-06 03:02:45 -04:00
}
2024-08-31 12:49:44 -04:00
if iNdEx >= l {
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, io . ErrUnexpectedEOF
}
b := dAtA [ iNdEx ]
iNdEx ++
2024-09-14 12:47:25 -04:00
stringLen |= uint64 ( b & 0x7F ) << shift
2024-08-31 12:49:44 -04:00
if b < 0x80 {
break
}
}
2024-09-14 12:47:25 -04:00
intStringLen := int ( stringLen )
if intStringLen < 0 {
2024-08-31 12:49:44 -04:00
return protoiface . UnmarshalOutput { NoUnkeyedLiterals : input . NoUnkeyedLiterals , Flags : input . Flags }, runtime . ErrInvalidLength
}
2024-09-14 12:47:25 -04:00
postIndex := iNdEx + intStringLen
2024-08-31 12:49:44 -04:00
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
}
2024-09-14 12:47:25 -04:00
x . Aud = string ( dAtA [ iNdEx : postIndex ])
2024-07-05 22:20:13 -04:00
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
}
}
2024-08-10 17:19:59 -04:00
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)
2024-08-31 12:49:44 -04:00
// source: did/v1/models.proto
2024-08-10 17:19:59 -04:00
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 )
)
2024-09-11 15:10:54 -04:00
// Alias defines a subject/origin pair
type Alias struct {
2024-08-10 17:19:59 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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"`
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) Reset () {
* x = Alias {}
2024-08-10 17:19:59 -04:00
if protoimpl . UnsafeEnabled {
2024-08-31 12:49:44 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 0 ]
2024-08-10 17:19:59 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
2024-07-05 22:20:13 -04:00
}
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) String () string {
2024-08-10 17:19:59 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * Alias ) ProtoMessage () {}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use Alias.ProtoReflect.Descriptor instead.
func ( * Alias ) Descriptor () ([] byte , [] int ) {
2024-08-31 12:49:44 -04:00
return file_did_v1_models_proto_rawDescGZIP (), [] int { 0 }
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) GetSubject () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Subject
2024-09-05 01:24:57 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) GetOrigin () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Origin
2024-09-05 01:24:57 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Alias ) GetController () string {
2024-09-05 01:24:57 -04:00
if x != nil {
return x . Controller
}
return ""
}
2024-09-11 15:10:54 -04:00
type Credential struct {
2024-09-05 01:24:57 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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"`
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) Reset () {
* x = Credential {}
2024-09-05 01:24:57 -04:00
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 1 ]
2024-09-05 01:24:57 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) String () string {
2024-09-05 01:24:57 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * Credential ) ProtoMessage () {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use Credential.ProtoReflect.Descriptor instead.
func ( * Credential ) Descriptor () ([] byte , [] int ) {
return file_did_v1_models_proto_rawDescGZIP (), [] int { 1 }
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetSubject () string {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-05 01:24:57 -04:00
return x . Subject
2024-08-10 17:01:14 -04:00
}
2024-09-05 01:24:57 -04:00
return ""
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetAttestationType () string {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . AttestationType
2024-08-10 17:01:14 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetOrigin () string {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Origin
2024-07-05 22:20:13 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetCredentialId () [] byte {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . CredentialId
2024-07-05 22:20:13 -04:00
}
return nil
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetPublicKey () [] byte {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . PublicKey
2024-07-05 22:20:13 -04:00
}
return nil
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetTransport () [] string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Transport
2024-09-05 01:24:57 -04:00
}
return nil
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetSignCount () uint32 {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . SignCount
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return 0
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetUserPresent () bool {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . UserPresent
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetUserVerified () bool {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . UserVerified
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetBackupEligible () bool {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . BackupEligible
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetBackupState () bool {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . BackupState
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Credential ) GetCloneWarning () bool {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . CloneWarning
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
// Document defines a DID document
type Document struct {
2024-08-10 17:19:59 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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"`
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) Reset () {
* x = Document {}
2024-08-10 17:19:59 -04:00
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 2 ]
2024-08-10 17:19:59 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) String () string {
2024-08-10 17:19:59 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * Document ) ProtoMessage () {}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use Document.ProtoReflect.Descriptor instead.
func ( * Document ) Descriptor () ([] byte , [] int ) {
return file_did_v1_models_proto_rawDescGZIP (), [] int { 2 }
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetId () string {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Id
2024-08-10 17:19:59 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetController () string {
2024-08-31 12:49:44 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Controller
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
return ""
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetAuthentication () [] string {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Authentication
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetAssertionMethod () [] string {
if x != nil {
return x . AssertionMethod
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetCapabilityDelegation () [] string {
if x != nil {
return x . CapabilityDelegation
}
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetCapabilityInvocation () [] string {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . CapabilityInvocation
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Document ) GetService () [] string {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Service
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
// Keyshare defines a keyshare from the MPC protocol
type Keyshare struct {
2024-08-10 17:19:59 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) Reset () {
* x = Keyshare {}
2024-08-10 17:19:59 -04:00
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 3 ]
2024-08-10 17:19:59 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) String () string {
2024-08-10 17:19:59 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * Keyshare ) ProtoMessage () {}
2024-08-10 17:19:59 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use Keyshare.ProtoReflect.Descriptor instead.
func ( * Keyshare ) Descriptor () ([] byte , [] int ) {
return file_did_v1_models_proto_rawDescGZIP (), [] int { 3 }
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) GetMetadata () map [ string ] string {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Metadata
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) GetPayloads () map [ string ][] byte {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Payloads
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
return nil
2024-08-31 12:49:44 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) GetProtocol () string {
2024-08-31 12:49:44 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Protocol
2024-08-31 12:49:44 -04:00
}
return ""
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Keyshare ) GetPublicKey () [] byte {
2024-08-10 17:19:59 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . PublicKey
2024-08-10 17:19:59 -04:00
}
2024-08-31 12:49:44 -04:00
return nil
2024-08-10 17:19:59 -04:00
}
2024-09-11 15:10:54 -04:00
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 {
2024-08-10 17:01:14 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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"`
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) Reset () {
* x = Permissions {}
2024-08-10 17:01:14 -04:00
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 4 ]
2024-08-10 17:01:14 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) String () string {
2024-08-10 17:01:14 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * Permissions ) ProtoMessage () {}
2024-08-10 17:01:14 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use Permissions.ProtoReflect.Descriptor instead.
func ( * Permissions ) Descriptor () ([] byte , [] int ) {
return file_did_v1_models_proto_rawDescGZIP (), [] int { 4 }
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) GetGrants () [] DIDNamespace {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Grants
2024-08-10 17:01:14 -04:00
}
return nil
}
2024-09-11 15:10:54 -04:00
func ( x * Permissions ) GetScopes () [] PermissionScope {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Scopes
2024-08-10 17:01:14 -04:00
}
return nil
}
// PubKey defines a public key for a did
type PubKey struct {
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-07 18:12:58 -04:00
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"`
2024-09-11 15:10:54 -04:00
Jwk * PubKey_JWK `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"`
2024-08-10 17:01:14 -04:00
}
func ( x * PubKey ) Reset () {
* x = PubKey {}
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 5 ]
2024-08-10 17:01:14 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
return file_did_v1_models_proto_rawDescGZIP (), [] int { 5 }
2024-08-10 17:01:14 -04:00
}
2024-09-05 01:24:57 -04:00
func ( x * PubKey ) GetRole () KeyRole {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-05 01:24:57 -04:00
return x . Role
2024-08-10 17:01:14 -04:00
}
2024-09-05 01:24:57 -04:00
return KeyRole_KEY_ROLE_UNSPECIFIED
2024-08-10 17:01:14 -04:00
}
2024-09-05 01:24:57 -04:00
func ( x * PubKey ) GetAlgorithm () KeyAlgorithm {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-05 01:24:57 -04:00
return x . Algorithm
}
return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED
}
func ( x * PubKey ) GetEncoding () KeyEncoding {
if x != nil {
return x . Encoding
}
return KeyEncoding_KEY_ENCODING_UNSPECIFIED
}
2024-09-07 18:12:58 -04:00
func ( x * PubKey ) GetCurve () KeyCurve {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-07 18:12:58 -04:00
return x . Curve
2024-08-10 17:01:14 -04:00
}
2024-09-07 18:12:58 -04:00
return KeyCurve_KEY_CURVE_UNSPECIFIED
2024-08-10 17:01:14 -04:00
}
2024-09-07 18:12:58 -04:00
func ( x * PubKey ) GetKeyType () KeyType {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-07 18:12:58 -04:00
return x . KeyType
2024-08-10 17:01:14 -04:00
}
2024-09-07 18:12:58 -04:00
return KeyType_KEY_TYPE_UNSPECIFIED
2024-08-10 17:01:14 -04:00
}
2024-09-07 18:12:58 -04:00
func ( x * PubKey ) GetRaw () [] byte {
2024-08-10 17:01:14 -04:00
if x != nil {
2024-09-07 18:12:58 -04:00
return x . Raw
2024-08-10 17:01:14 -04:00
}
2024-09-07 18:12:58 -04:00
return nil
2024-08-10 17:01:14 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey ) GetJwk () * PubKey_JWK {
2024-09-05 01:24:57 -04:00
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
2024-09-11 15:10:54 -04:00
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"`
2024-09-05 01:24:57 -04:00
}
func ( x * Service ) Reset () {
* x = Service {}
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 6 ]
2024-09-05 01:24:57 -04:00
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 ) {
2024-09-11 15:10:54 -04:00
return file_did_v1_models_proto_rawDescGZIP (), [] int { 6 }
2024-09-05 01:24:57 -04:00
}
func ( x * Service ) GetId () string {
if x != nil {
return x . Id
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * Service ) GetServiceType () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . ServiceType
}
return ""
}
func ( x * Service ) GetAuthority () string {
if x != nil {
return x . Authority
2024-09-05 01:24:57 -04:00
}
return ""
}
func ( x * Service ) GetOrigin () string {
if x != nil {
return x . Origin
}
return ""
}
2024-09-11 15:10:54 -04:00
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
}
2024-09-05 01:24:57 -04:00
func ( x * Service ) GetPermissions () * Permissions {
if x != nil {
return x . Permissions
}
return nil
}
2024-09-11 15:10:54 -04:00
// 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 {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Exists
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
return false
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * ServiceInfo ) GetOrigin () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
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
2024-09-05 01:24:57 -04:00
}
return nil
}
2024-09-14 12:47:25 -04:00
// FirstPartyCaveat defines a first party caveat
type FirstPartyCaveat struct {
2024-09-05 01:24:57 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-14 12:47:25 -04:00
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"`
2024-09-05 01:24:57 -04:00
}
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) Reset () {
* x = FirstPartyCaveat {}
2024-09-05 01:24:57 -04:00
if protoimpl . UnsafeEnabled {
2024-09-11 15:10:54 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 8 ]
2024-09-05 01:24:57 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) String () string {
2024-09-05 01:24:57 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-14 12:47:25 -04:00
func ( * FirstPartyCaveat ) ProtoMessage () {}
2024-09-05 01:24:57 -04:00
2024-09-14 12:47:25 -04:00
// Deprecated: Use FirstPartyCaveat.ProtoReflect.Descriptor instead.
func ( * FirstPartyCaveat ) Descriptor () ([] byte , [] int ) {
2024-09-11 15:10:54 -04:00
return file_did_v1_models_proto_rawDescGZIP (), [] int { 8 }
2024-09-05 01:24:57 -04:00
}
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) GetScope () * Permissions {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-14 12:47:25 -04:00
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
2024-09-05 01:24:57 -04:00
}
return ""
}
2024-09-14 12:47:25 -04:00
func ( x * FirstPartyCaveat ) GetAud () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-14 12:47:25 -04:00
return x . Aud
2024-09-05 01:24:57 -04:00
}
return ""
}
2024-09-14 12:47:25 -04:00
// 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 {
2024-08-31 12:49:44 -04:00
if x != nil {
2024-09-14 12:47:25 -04:00
return x . Scope
2024-08-31 12:49:44 -04:00
}
return nil
}
2024-09-14 12:47:25 -04:00
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 ""
}
2024-09-11 15:10:54 -04:00
// JWK represents a JSON Web Key
type PubKey_JWK struct {
2024-07-05 22:20:13 -04:00
state protoimpl . MessageState
sizeCache protoimpl . SizeCache
unknownFields protoimpl . UnknownFields
2024-09-11 15:10:54 -04:00
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)
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) Reset () {
* x = PubKey_JWK {}
2024-07-05 22:20:13 -04:00
if protoimpl . UnsafeEnabled {
2024-09-14 12:47:25 -04:00
mi := & file_did_v1_models_proto_msgTypes [ 12 ]
2024-07-05 22:20:13 -04:00
ms := protoimpl . X . MessageStateOf ( protoimpl . Pointer ( x ))
ms . StoreMessageInfo ( mi )
}
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) String () string {
2024-07-05 22:20:13 -04:00
return protoimpl . X . MessageStringOf ( x )
}
2024-09-11 15:10:54 -04:00
func ( * PubKey_JWK ) ProtoMessage () {}
2024-07-05 22:20:13 -04:00
2024-09-11 15:10:54 -04:00
// Deprecated: Use PubKey_JWK.ProtoReflect.Descriptor instead.
func ( * PubKey_JWK ) Descriptor () ([] byte , [] int ) {
return file_did_v1_models_proto_rawDescGZIP (), [] int { 5 , 0 }
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetKty () string {
2024-09-07 18:12:58 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Kty
2024-09-07 18:12:58 -04:00
}
2024-09-11 15:10:54 -04:00
return ""
2024-07-05 22:20:13 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetCrv () string {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Crv
2024-07-05 22:20:13 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetX () string {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . X
2024-07-05 22:20:13 -04:00
}
return ""
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetY () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . Y
2024-09-05 01:24:57 -04:00
}
2024-09-07 18:12:58 -04:00
return ""
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetN () string {
2024-07-05 22:20:13 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . N
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
return ""
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
func ( x * PubKey_JWK ) GetE () string {
2024-09-05 01:24:57 -04:00
if x != nil {
2024-09-11 15:10:54 -04:00
return x . E
2024-09-05 01:24:57 -04:00
}
2024-09-11 15:10:54 -04:00
return ""
2024-09-05 01:24:57 -04:00
}
2024-08-31 12:49:44 -04:00
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 ,
2024-09-07 18:12:58 -04:00
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 ,
2024-09-11 15:10:54 -04:00
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 ,
2024-09-14 12:47:25 -04:00
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 ,
2024-07-05 22:20:13 -04:00
}
var (
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_rawDescOnce sync . Once
file_did_v1_models_proto_rawDescData = file_did_v1_models_proto_rawDesc
2024-07-05 22:20:13 -04:00
)
2024-08-31 12:49:44 -04:00
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 )
2024-07-05 22:20:13 -04:00
})
2024-08-31 12:49:44 -04:00
return file_did_v1_models_proto_rawDescData
}
2024-09-14 12:47:25 -04:00
var file_did_v1_models_proto_msgTypes = make ([] protoimpl . MessageInfo , 14 )
2024-08-31 12:49:44 -04:00
var file_did_v1_models_proto_goTypes = [] interface {}{
2024-09-14 12:47:25 -04:00
( * 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
2024-08-31 12:49:44 -04:00
}
var file_did_v1_models_proto_depIdxs = [] int32 {
2024-09-14 12:47:25 -04:00
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
2024-09-11 15:10:54 -04:00
4 , // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions
6 , // 12: did.v1.ServiceInfo.service:type_name -> did.v1.Service
2024-09-14 12:47:25 -04:00
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
2024-08-31 12:49:44 -04:00
}
func init () { file_did_v1_models_proto_init () }
func file_did_v1_models_proto_init () {
if File_did_v1_models_proto != nil {
2024-07-05 22:20:13 -04:00
return
}
2024-08-31 12:49:44 -04:00
file_did_v1_genesis_proto_init ()
2024-07-05 22:20:13 -04:00
if ! protoimpl . UnsafeEnabled {
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 0 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * Alias ); i {
2024-08-10 17:01:14 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 1 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-08-10 17:19:59 -04:00
switch v := v .( * Credential ); i {
2024-08-10 17:01:14 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 2 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * Document ); i {
2024-08-10 17:01:14 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 3 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * Keyshare ); i {
2024-08-10 17:19:59 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 4 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * Permissions ); i {
2024-08-10 17:19:59 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 5 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * PubKey ); i {
2024-08-10 17:19:59 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 6 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * Service ); i {
2024-08-10 17:19:59 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 7 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * ServiceInfo ); i {
2024-08-10 17:19:59 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-08-31 12:49:44 -04:00
file_did_v1_models_proto_msgTypes [ 8 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-14 12:47:25 -04:00
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 {
2024-07-05 22:20:13 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-09-14 12:47:25 -04:00
file_did_v1_models_proto_msgTypes [ 12 ]. Exporter = func ( v interface {}, i int ) interface {} {
2024-09-11 15:10:54 -04:00
switch v := v .( * PubKey_JWK ); i {
2024-09-05 01:24:57 -04:00
case 0 :
return & v . state
case 1 :
return & v . sizeCache
case 2 :
return & v . unknownFields
default :
return nil
}
}
2024-07-05 22:20:13 -04:00
}
type x struct {}
out := protoimpl . TypeBuilder {
File : protoimpl . DescBuilder {
GoPackagePath : reflect . TypeOf ( x {}). PkgPath (),
2024-08-31 12:49:44 -04:00
RawDescriptor : file_did_v1_models_proto_rawDesc ,
2024-07-05 22:20:13 -04:00
NumEnums : 0 ,
2024-09-14 12:47:25 -04:00
NumMessages : 14 ,
2024-07-05 22:20:13 -04:00
NumExtensions : 0 ,
NumServices : 0 ,
},
2024-08-31 12:49:44 -04:00
GoTypes : file_did_v1_models_proto_goTypes ,
DependencyIndexes : file_did_v1_models_proto_depIdxs ,
MessageInfos : file_did_v1_models_proto_msgTypes ,
2024-07-05 22:20:13 -04:00
}. Build ()
2024-08-31 12:49:44 -04:00
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
2024-07-05 22:20:13 -04:00
}