mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-11 13:29:12 +00:00
* chore: remove unused new.Dockerfile * feat: add DID model definitions * fix: Fix EncodePublicKey method in KeyInfo struct * feat: Update `EncodePublicKey` to be the inverse of `DecodePublicKey` * refactor: update AssetInfo protobuf definition * fix: update default assets with correct asset types * fix: Initialize IPFS client and check for mounted directories * feat: Improve IPFS client initialization and mount checking * feat: Add local filesystem check for IPFS and IPNS * fix: Use Unixfs().Get() instead of Cat() for IPFS and IPNS content retrieval * feat: Update GetCID and GetIPNS functions to read data from IPFS node * fix: Ensure IPFS client is initialized before pinning CID * feat: Add AddFile and AddFolder methods * feat: add IPFS file system abstraction * feat: Implement IPFS file, location, and filesystem abstractions * refactor: remove unused functions and types * refactor: remove unused FileSystem interface * feat: add initial wasm entrypoint * feat: add basic vault command operations * docs: add vault module features * test: remove test for MsgUpdateParams * refactor: Replace PrimaryKey with Property struct in zkprop.go * feat: Update the `CreateWitness` and `CreateAccumulator` and `VerifyWitness` and `UpdateAccumulator` to Use the new `Accumulator` and `Witness` types. Then Clean up the code in the file and refactor the marshalling methods * <no value> * feat: add KeyCurve and KeyType to KeyInfo in genesis * feat: add WASM build step to devbox.json * feat: Add zkgate.go file * feat: Uncomment and modify zkgate code to work with Property struct * feat: Merge zkgate.go and zkprop.go logic * feat: implement API endpoints for profile management * refactor: remove unused template file * feat(orm): remove unused ORM models * feat: add persistent SQLite database support in WASM * fix: Update module names in protobuf files * feat: Add method to initialize SQLite database * fix: update go-sqlite3 dependency to version 1.14.23 * feat: introduce database layer * feat: Implement database layer for Vault node * feature/update-dockerfile * feat: Add keyshares table * fix: Reorder the SQL statements in the tables.go file * feat: Update the `createCredentialsTable` method to match the proper Credential struct * feat: Update createProfilesTable and add createPropertiesTable * feat: Add constant SQL queries to queries.go and use prepared statements in db.go * feat: Add createKeysharesTable to internal/db/db.go * feat: Update `createPermissionsTable` to match Permissions struct * feat: Add database enum types * feat: Add DIDNamespace and PermissionScope enums * feat: Add DBConfig and DBOption types * feat: Update the db implementation to use the provided go library * fix: update db implementation to use go-sqlite3 v0.18.2 * fix: Refactor database connection and statement handling * feat: Simplify db.go implementation * feat: Convert constant SQL queries to functions in queries.go and update db.go to use prepared statements * feat: Add models.go file with database table structs * fix: Remove unused statement map and prepare statements diff --git a/internal/db/db.go b/internal/db/db.go index 201d09b..d4d4d4e 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -32,11 +32,6 @@ func Open(config *DBConfig) (*DB, error) { Conn: conn, } - if err := createTables(db); err != nil { - conn.Close() - return nil, fmt.Errorf("failed to create tables: %w", err) - } - return db, nil } @@ -61,114 +56,3 @@ func createTables(db *DB) error { return nil } -// AddAccount adds a new account to the database -func (db *DB) AddAccount(name, address string) error { - return db.Exec(insertAccountQuery(name, address)) -} - -// AddAsset adds a new asset to the database -func (db *DB) AddAsset(name, symbol string, decimals int, chainID int64) error { - return db.Exec(insertAssetQuery(name, symbol, decimals, chainID)) -} - -// AddChain adds a new chain to the database -func (db *DB) AddChain(name, networkID string) error { - return db.Exec(insertChainQuery(name, networkID)) -} - -// AddCredential adds a new credential to the database -func (db *DB) AddCredential( - handle, controller, attestationType, origin string, - credentialID, publicKey []byte, - transport string, - signCount uint32, - userPresent, userVerified, backupEligible, backupState, cloneWarning bool, -) error { - return db.Exec(insertCredentialQuery( - handle, - controller, - attestationType, - origin, - credentialID, - publicKey, - transport, - signCount, - userPresent, - userVerified, - backupEligible, - backupState, - cloneWarning, - )) -} - -// AddProfile adds a new profile to the database -func (db *DB) AddProfile( - id, subject, controller, originURI, publicMetadata, privateMetadata string, -) error { - return db.statements["insertProfile"].Exec( - id, subject, controller, originURI, publicMetadata, privateMetadata, - ) -} - -// AddProperty adds a new property to the database -func (db *DB) AddProperty( - profileID, key, accumulator, propertyKey string, -) error { - return db.statements["insertProperty"].Exec( - profileID, key, accumulator, propertyKey, - ) -} - -// AddPermission adds a new permission to the database -func (db *DB) AddPermission( - serviceID string, - grants []DIDNamespace, - scopes []PermissionScope, -) error { - grantsJSON, err := json.Marshal(grants) - if err != nil { - return fmt.Errorf("failed to marshal grants: %w", err) - } - - scopesJSON, err := json.Marshal(scopes) - if err != nil { - return fmt.Errorf("failed to marshal scopes: %w", err) - } - - return db.statements["insertPermission"].Exec( - serviceID, string(grantsJSON), string(scopesJSON), - ) -} - -// GetPermission retrieves the permission for the given service ID -func (db *DB) GetPermission(serviceID string) ([]DIDNamespace, []PermissionScope, error) { - row := db.statements["getPermission"].QueryRow(serviceID) - - var grantsJSON, scopesJSON string - if err := row.Scan(&grantsJSON, &scopesJSON); err != nil { - return nil, nil, fmt.Errorf("failed to get permission: %w", err) - } - - var grants []DIDNamespace - if err := json.Unmarshal([]byte(grantsJSON), &grants); err != nil { - return nil, nil, fmt.Errorf("failed to unmarshal grants: %w", err) - } - - var scopes []PermissionScope - if err := json.Unmarshal([]byte(scopesJSON), &scopes); err != nil { - return nil, nil, fmt.Errorf("failed to unmarshal scopes: %w", err) - } - - return grants, scopes, nil -} - -// Close closes the database connection and finalizes all prepared statements -func (db *DB) Close() error { - for _, stmt := range db.statements { - stmt.Finalize() - } - return db.Conn.Close() -} diff --git a/internal/db/queries.go b/internal/db/queries.go index 807d701..e69de29 100644 --- a/internal/db/queries.go +++ b/internal/db/queries.go @@ -1,79 +0,0 @@ -package db - -import "fmt" - -// Account queries -func insertAccountQuery(name, address string) string { - return fmt.Sprintf(`INSERT INTO accounts (name, address) VALUES (%s, %s)`, name, address) -} - -// Asset queries -func insertAssetQuery(name, symbol string, decimals int, chainID int64) string { - return fmt.Sprintf( - `INSERT INTO assets (name, symbol, decimals, chain_id) VALUES (%s, %s, %d, %d)`, - name, - symbol, - decimals, - chainID, - ) -} - -// Chain queries -func insertChainQuery(name string, networkID string) string { - return fmt.Sprintf(`INSERT INTO chains (name, network_id) VALUES (%s, %d)`, name, networkID) -} - -// Credential queries -func insertCredentialQuery( - handle, controller, attestationType, origin string, - credentialID, publicKey []byte, - transport string, - signCount uint32, - userPresent, userVerified, backupEligible, backupState, cloneWarning bool, -) string { - return fmt.Sprintf(`INSERT INTO credentials ( - handle, controller, attestation_type, origin, - credential_id, public_key, transport, sign_count, - user_present, user_verified, backup_eligible, - backup_state, clone_warning - ) VALUES (%s, %s, %s, %s, %s, %s, %s, %d, %t, %t, %t, %t, %t)`, - handle, controller, attestationType, origin, - credentialID, publicKey, transport, signCount, - userPresent, userVerified, backupEligible, - backupState, cloneWarning) -} - -// Profile queries -func insertProfileQuery( - id, subject, controller, originURI, publicMetadata, privateMetadata string, -) string { - return fmt.Sprintf(`INSERT INTO profiles ( - id, subject, controller, origin_uri, - public_metadata, private_metadata - ) VALUES (%s, %s, %s, %s, %s, %s)`, - id, subject, controller, originURI, - publicMetadata, privateMetadata) -} - -// Property queries -func insertPropertyQuery(profileID, key, accumulator, propertyKey string) string { - return fmt.Sprintf(`INSERT INTO properties ( - profile_id, key, accumulator, property_key - ) VALUES (%s, %s, %s, %s)`, - profileID, key, accumulator, propertyKey) -} - -// Permission queries -func insertPermissionQuery(serviceID, grants, scopes string) string { - return fmt.Sprintf( - `INSERT INTO permissions (service_id, grants, scopes) VALUES (%s, %s, %s)`, - serviceID, - grants, - scopes, - ) -} - -// GetPermission query -func getPermissionQuery(serviceID string) string { - return fmt.Sprintf(`SELECT grants, scopes FROM permissions WHERE service_id = %s`, serviceID) -} * fix: update Makefile to use sonrd instead of wasmd * feat: Add targets for templ and vault in Makefile and use only make in devbox.json * feat: add SQLite database support * bump: version 0.6.0 → 0.7.0 * refactor: upgrade actions to latest versions
10652 lines
364 KiB
Go
10652 lines
364 KiB
Go
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
|
package didv1
|
|
|
|
import (
|
|
fmt "fmt"
|
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
io "io"
|
|
reflect "reflect"
|
|
sort "sort"
|
|
sync "sync"
|
|
)
|
|
|
|
var (
|
|
md_Accumulator protoreflect.MessageDescriptor
|
|
fd_Accumulator_accumulator protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Accumulator = File_did_v1_models_proto.Messages().ByName("Accumulator")
|
|
fd_Accumulator_accumulator = md_Accumulator.Fields().ByName("accumulator")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Accumulator)(nil)
|
|
|
|
type fastReflection_Accumulator Accumulator
|
|
|
|
func (x *Accumulator) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Accumulator)(x)
|
|
}
|
|
|
|
func (x *Accumulator) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[0]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Accumulator_messageType fastReflection_Accumulator_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Accumulator_messageType{}
|
|
|
|
type fastReflection_Accumulator_messageType struct{}
|
|
|
|
func (x fastReflection_Accumulator_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Accumulator)(nil)
|
|
}
|
|
func (x fastReflection_Accumulator_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Accumulator)
|
|
}
|
|
func (x fastReflection_Accumulator_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Accumulator
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Accumulator) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Accumulator
|
|
}
|
|
|
|
// 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_Accumulator) Type() protoreflect.MessageType {
|
|
return _fastReflection_Accumulator_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Accumulator) New() protoreflect.Message {
|
|
return new(fastReflection_Accumulator)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Accumulator) Interface() protoreflect.ProtoMessage {
|
|
return (*Accumulator)(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_Accumulator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if len(x.Accumulator) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Accumulator)
|
|
if !f(fd_Accumulator_accumulator, 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_Accumulator) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
return len(x.Accumulator) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
x.Accumulator = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
value := x.Accumulator
|
|
return protoreflect.ValueOfBytes(value)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
x.Accumulator = value.Bytes()
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
panic(fmt.Errorf("field accumulator of message did.v1.Accumulator is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Accumulator.accumulator":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Accumulator 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_Accumulator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Accumulator", 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_Accumulator) 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_Accumulator) 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_Accumulator) 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_Accumulator) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Accumulator)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Accumulator)
|
|
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().(*Accumulator)
|
|
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.Accumulator) > 0 {
|
|
i -= len(x.Accumulator)
|
|
copy(dAtA[i:], x.Accumulator)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator)))
|
|
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().(*Accumulator)
|
|
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: Accumulator: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Accumulator: 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 Accumulator", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Accumulator == nil {
|
|
x.Accumulator = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Credential_4_list)(nil)
|
|
|
|
type _Credential_4_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_Credential_4_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Credential_4_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_Credential_4_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Credential_4_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Credential_4_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind"))
|
|
}
|
|
|
|
func (x *_Credential_4_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Credential_4_list) NewElement() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Credential_4_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var (
|
|
md_Credential protoreflect.MessageDescriptor
|
|
fd_Credential_id protoreflect.FieldDescriptor
|
|
fd_Credential_credential_type protoreflect.FieldDescriptor
|
|
fd_Credential_credential_id protoreflect.FieldDescriptor
|
|
fd_Credential_transport protoreflect.FieldDescriptor
|
|
fd_Credential_subject protoreflect.FieldDescriptor
|
|
fd_Credential_controller protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Credential = File_did_v1_models_proto.Messages().ByName("Credential")
|
|
fd_Credential_id = md_Credential.Fields().ByName("id")
|
|
fd_Credential_credential_type = md_Credential.Fields().ByName("credential_type")
|
|
fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id")
|
|
fd_Credential_transport = md_Credential.Fields().ByName("transport")
|
|
fd_Credential_subject = md_Credential.Fields().ByName("subject")
|
|
fd_Credential_controller = md_Credential.Fields().ByName("controller")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Credential)(nil)
|
|
|
|
type fastReflection_Credential Credential
|
|
|
|
func (x *Credential) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Credential)(x)
|
|
}
|
|
|
|
func (x *Credential) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[1]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Credential_messageType fastReflection_Credential_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Credential_messageType{}
|
|
|
|
type fastReflection_Credential_messageType struct{}
|
|
|
|
func (x fastReflection_Credential_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Credential)(nil)
|
|
}
|
|
func (x fastReflection_Credential_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Credential)
|
|
}
|
|
func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Credential
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Credential
|
|
}
|
|
|
|
// Type returns the message type, which encapsulates both Go and protobuf
|
|
// type information. If the Go type information is not needed,
|
|
// it is recommended that the message descriptor be used instead.
|
|
func (x *fastReflection_Credential) Type() protoreflect.MessageType {
|
|
return _fastReflection_Credential_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Credential) New() protoreflect.Message {
|
|
return new(fastReflection_Credential)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage {
|
|
return (*Credential)(x)
|
|
}
|
|
|
|
// Range iterates over every populated field in an undefined order,
|
|
// calling f for each field descriptor and value encountered.
|
|
// Range returns immediately if f returns false.
|
|
// While iterating, mutating operations may only be performed
|
|
// on the current field descriptor.
|
|
func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_Credential_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.CredentialType != "" {
|
|
value := protoreflect.ValueOfString(x.CredentialType)
|
|
if !f(fd_Credential_credential_type, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.CredentialId) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.CredentialId)
|
|
if !f(fd_Credential_credential_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Transport) != 0 {
|
|
value := protoreflect.ValueOfList(&_Credential_4_list{list: &x.Transport})
|
|
if !f(fd_Credential_transport, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Subject != "" {
|
|
value := protoreflect.ValueOfString(x.Subject)
|
|
if !f(fd_Credential_subject, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Controller != "" {
|
|
value := protoreflect.ValueOfString(x.Controller)
|
|
if !f(fd_Credential_controller, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Credential.id":
|
|
return x.Id != ""
|
|
case "did.v1.Credential.credential_type":
|
|
return x.CredentialType != ""
|
|
case "did.v1.Credential.credential_id":
|
|
return len(x.CredentialId) != 0
|
|
case "did.v1.Credential.transport":
|
|
return len(x.Transport) != 0
|
|
case "did.v1.Credential.subject":
|
|
return x.Subject != ""
|
|
case "did.v1.Credential.controller":
|
|
return x.Controller != ""
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Clear clears the field such that a subsequent Has call reports false.
|
|
//
|
|
// Clearing an extension field clears both the extension type and value
|
|
// associated with the given field number.
|
|
//
|
|
// Clear is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Credential.id":
|
|
x.Id = ""
|
|
case "did.v1.Credential.credential_type":
|
|
x.CredentialType = ""
|
|
case "did.v1.Credential.credential_id":
|
|
x.CredentialId = nil
|
|
case "did.v1.Credential.transport":
|
|
x.Transport = nil
|
|
case "did.v1.Credential.subject":
|
|
x.Subject = ""
|
|
case "did.v1.Credential.controller":
|
|
x.Controller = ""
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Get retrieves the value for a field.
|
|
//
|
|
// For unpopulated scalars, it returns the default value, where
|
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
|
// For unpopulated composite types, it returns an empty, read-only view
|
|
// of the value; to obtain a mutable reference, use Mutable.
|
|
func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Credential.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Credential.credential_type":
|
|
value := x.CredentialType
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Credential.credential_id":
|
|
value := x.CredentialId
|
|
return protoreflect.ValueOfBytes(value)
|
|
case "did.v1.Credential.transport":
|
|
if len(x.Transport) == 0 {
|
|
return protoreflect.ValueOfList(&_Credential_4_list{})
|
|
}
|
|
listValue := &_Credential_4_list{list: &x.Transport}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Credential.subject":
|
|
value := x.Subject
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Credential.controller":
|
|
value := x.Controller
|
|
return protoreflect.ValueOfString(value)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", descriptor.FullName()))
|
|
}
|
|
}
|
|
|
|
// Set stores the value for a field.
|
|
//
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
|
// When setting a composite type, it is unspecified whether the stored value
|
|
// aliases the source's memory in any way. If the composite value is an
|
|
// empty, read-only value, then it panics.
|
|
//
|
|
// Set is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Credential.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.Credential.credential_type":
|
|
x.CredentialType = value.Interface().(string)
|
|
case "did.v1.Credential.credential_id":
|
|
x.CredentialId = value.Bytes()
|
|
case "did.v1.Credential.transport":
|
|
lv := value.List()
|
|
clv := lv.(*_Credential_4_list)
|
|
x.Transport = *clv.list
|
|
case "did.v1.Credential.subject":
|
|
x.Subject = value.Interface().(string)
|
|
case "did.v1.Credential.controller":
|
|
x.Controller = value.Interface().(string)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Mutable returns a mutable reference to a composite type.
|
|
//
|
|
// If the field is unpopulated, it may allocate a composite value.
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType
|
|
// if not already stored.
|
|
// It panics if the field does not contain a composite type.
|
|
//
|
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Credential.transport":
|
|
if x.Transport == nil {
|
|
x.Transport = []string{}
|
|
}
|
|
value := &_Credential_4_list{list: &x.Transport}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Credential.id":
|
|
panic(fmt.Errorf("field id of message did.v1.Credential is not mutable"))
|
|
case "did.v1.Credential.credential_type":
|
|
panic(fmt.Errorf("field credential_type 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.subject":
|
|
panic(fmt.Errorf("field subject of message did.v1.Credential is not mutable"))
|
|
case "did.v1.Credential.controller":
|
|
panic(fmt.Errorf("field controller of message did.v1.Credential is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// NewField returns a new value that is assignable to the field
|
|
// for the given descriptor. For scalars, this returns the default value.
|
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
|
func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Credential.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Credential.credential_type":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Credential.credential_id":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
case "did.v1.Credential.transport":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Credential_4_list{list: &list})
|
|
case "did.v1.Credential.subject":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Credential.controller":
|
|
return protoreflect.ValueOfString("")
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// WhichOneof reports which field within the oneof is populated,
|
|
// returning nil if none are populated.
|
|
// It panics if the oneof descriptor does not belong to this message.
|
|
func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Credential", d.FullName()))
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
// GetUnknown retrieves the entire list of unknown fields.
|
|
// The caller may only mutate the contents of the RawFields
|
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
|
func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields {
|
|
return x.unknownFields
|
|
}
|
|
|
|
// SetUnknown stores an entire list of unknown fields.
|
|
// The raw fields must be syntactically valid according to the wire format.
|
|
// An implementation may panic if this is not the case.
|
|
// Once stored, the caller must not mutate the content of the RawFields.
|
|
// An empty RawFields may be passed to clear the fields.
|
|
//
|
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) {
|
|
x.unknownFields = fields
|
|
}
|
|
|
|
// IsValid reports whether the message is valid.
|
|
//
|
|
// An invalid message is an empty, read-only value.
|
|
//
|
|
// An invalid message often corresponds to a nil pointer of the concrete
|
|
// message type, but the details are implementation dependent.
|
|
// Validity is not part of the protobuf data model, and may not
|
|
// be preserved in marshaling or other operations.
|
|
func (x *fastReflection_Credential) IsValid() bool {
|
|
return x != nil
|
|
}
|
|
|
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
|
// This method may return nil.
|
|
//
|
|
// The returned methods type is identical to
|
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
|
// Consult the protoiface package documentation for details.
|
|
func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Credential)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.CredentialType)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.CredentialId)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if len(x.Transport) > 0 {
|
|
for _, s := range x.Transport {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
l = len(x.Subject)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Controller)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*Credential)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if 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] = 0x3a
|
|
}
|
|
if len(x.Subject) > 0 {
|
|
i -= len(x.Subject)
|
|
copy(dAtA[i:], x.Subject)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
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] = 0x22
|
|
}
|
|
}
|
|
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] = 0x1a
|
|
}
|
|
if len(x.CredentialType) > 0 {
|
|
i -= len(x.CredentialType)
|
|
copy(dAtA[i:], x.CredentialType)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialType)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Credential)
|
|
if x == nil {
|
|
return protoiface.UnmarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Flags: input.Flags,
|
|
}, nil
|
|
}
|
|
options := runtime.UnmarshalInputToOptions(input)
|
|
_ = options
|
|
dAtA := input.Buf
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialType", 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.CredentialType = 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 CredentialId", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.CredentialId == nil {
|
|
x.CredentialId = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 6:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Subject = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Controller = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.List = (*_DID_5_list)(nil)
|
|
|
|
type _DID_5_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_DID_5_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_DID_5_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_DID_5_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_DID_5_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_DID_5_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message DID at list field Paths as it is not of Message kind"))
|
|
}
|
|
|
|
func (x *_DID_5_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_DID_5_list) NewElement() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_DID_5_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var (
|
|
md_DID protoreflect.MessageDescriptor
|
|
fd_DID_method protoreflect.FieldDescriptor
|
|
fd_DID_network protoreflect.FieldDescriptor
|
|
fd_DID_subject protoreflect.FieldDescriptor
|
|
fd_DID_identifier protoreflect.FieldDescriptor
|
|
fd_DID_paths protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_DID = File_did_v1_models_proto.Messages().ByName("DID")
|
|
fd_DID_method = md_DID.Fields().ByName("method")
|
|
fd_DID_network = md_DID.Fields().ByName("network")
|
|
fd_DID_subject = md_DID.Fields().ByName("subject")
|
|
fd_DID_identifier = md_DID.Fields().ByName("identifier")
|
|
fd_DID_paths = md_DID.Fields().ByName("paths")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_DID)(nil)
|
|
|
|
type fastReflection_DID DID
|
|
|
|
func (x *DID) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_DID)(x)
|
|
}
|
|
|
|
func (x *DID) 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_DID_messageType fastReflection_DID_messageType
|
|
var _ protoreflect.MessageType = fastReflection_DID_messageType{}
|
|
|
|
type fastReflection_DID_messageType struct{}
|
|
|
|
func (x fastReflection_DID_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_DID)(nil)
|
|
}
|
|
func (x fastReflection_DID_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_DID)
|
|
}
|
|
func (x fastReflection_DID_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_DID
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_DID) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_DID
|
|
}
|
|
|
|
// 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_DID) Type() protoreflect.MessageType {
|
|
return _fastReflection_DID_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_DID) New() protoreflect.Message {
|
|
return new(fastReflection_DID)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_DID) Interface() protoreflect.ProtoMessage {
|
|
return (*DID)(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_DID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Method != 0 {
|
|
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method))
|
|
if !f(fd_DID_method, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Network != "" {
|
|
value := protoreflect.ValueOfString(x.Network)
|
|
if !f(fd_DID_network, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Subject != "" {
|
|
value := protoreflect.ValueOfString(x.Subject)
|
|
if !f(fd_DID_subject, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Identifier != "" {
|
|
value := protoreflect.ValueOfString(x.Identifier)
|
|
if !f(fd_DID_identifier, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Paths) != 0 {
|
|
value := protoreflect.ValueOfList(&_DID_5_list{list: &x.Paths})
|
|
if !f(fd_DID_paths, 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_DID) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.DID.method":
|
|
return x.Method != 0
|
|
case "did.v1.DID.network":
|
|
return x.Network != ""
|
|
case "did.v1.DID.subject":
|
|
return x.Subject != ""
|
|
case "did.v1.DID.identifier":
|
|
return x.Identifier != ""
|
|
case "did.v1.DID.paths":
|
|
return len(x.Paths) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.DID.method":
|
|
x.Method = 0
|
|
case "did.v1.DID.network":
|
|
x.Network = ""
|
|
case "did.v1.DID.subject":
|
|
x.Subject = ""
|
|
case "did.v1.DID.identifier":
|
|
x.Identifier = ""
|
|
case "did.v1.DID.paths":
|
|
x.Paths = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.DID.method":
|
|
value := x.Method
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
|
|
case "did.v1.DID.network":
|
|
value := x.Network
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.DID.subject":
|
|
value := x.Subject
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.DID.identifier":
|
|
value := x.Identifier
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.DID.paths":
|
|
if len(x.Paths) == 0 {
|
|
return protoreflect.ValueOfList(&_DID_5_list{})
|
|
}
|
|
listValue := &_DID_5_list{list: &x.Paths}
|
|
return protoreflect.ValueOfList(listValue)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.DID.method":
|
|
x.Method = (DIDNamespace)(value.Enum())
|
|
case "did.v1.DID.network":
|
|
x.Network = value.Interface().(string)
|
|
case "did.v1.DID.subject":
|
|
x.Subject = value.Interface().(string)
|
|
case "did.v1.DID.identifier":
|
|
x.Identifier = value.Interface().(string)
|
|
case "did.v1.DID.paths":
|
|
lv := value.List()
|
|
clv := lv.(*_DID_5_list)
|
|
x.Paths = *clv.list
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.DID.paths":
|
|
if x.Paths == nil {
|
|
x.Paths = []string{}
|
|
}
|
|
value := &_DID_5_list{list: &x.Paths}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.DID.method":
|
|
panic(fmt.Errorf("field method of message did.v1.DID is not mutable"))
|
|
case "did.v1.DID.network":
|
|
panic(fmt.Errorf("field network of message did.v1.DID is not mutable"))
|
|
case "did.v1.DID.subject":
|
|
panic(fmt.Errorf("field subject of message did.v1.DID is not mutable"))
|
|
case "did.v1.DID.identifier":
|
|
panic(fmt.Errorf("field identifier of message did.v1.DID is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.DID.method":
|
|
return protoreflect.ValueOfEnum(0)
|
|
case "did.v1.DID.network":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.DID.subject":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.DID.identifier":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.DID.paths":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_DID_5_list{list: &list})
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.DID 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_DID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.DID", 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_DID) 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_DID) 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_DID) 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_DID) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*DID)
|
|
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.Method != 0 {
|
|
n += 1 + runtime.Sov(uint64(x.Method))
|
|
}
|
|
l = len(x.Network)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Subject)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Identifier)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if len(x.Paths) > 0 {
|
|
for _, s := range x.Paths {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*DID)
|
|
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.Paths) > 0 {
|
|
for iNdEx := len(x.Paths) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(x.Paths[iNdEx])
|
|
copy(dAtA[i:], x.Paths[iNdEx])
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Paths[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
}
|
|
if len(x.Identifier) > 0 {
|
|
i -= len(x.Identifier)
|
|
copy(dAtA[i:], x.Identifier)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(x.Subject) > 0 {
|
|
i -= len(x.Subject)
|
|
copy(dAtA[i:], x.Subject)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(x.Network) > 0 {
|
|
i -= len(x.Network)
|
|
copy(dAtA[i:], x.Network)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if x.Method != 0 {
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Method))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*DID)
|
|
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: DID: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: 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 Method", wireType)
|
|
}
|
|
x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", 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.Network = 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 Subject", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Subject = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", 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.Identifier = 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 Paths", 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.Paths = append(x.Paths, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Document_2_list)(nil)
|
|
|
|
type _Document_2_list struct {
|
|
list *[]*VerificationMethod
|
|
}
|
|
|
|
func (x *_Document_2_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Document_2_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect())
|
|
}
|
|
|
|
func (x *_Document_2_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.Message()
|
|
concreteValue := valueUnwrapped.Interface().(*VerificationMethod)
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Document_2_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.Message()
|
|
concreteValue := valueUnwrapped.Interface().(*VerificationMethod)
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Document_2_list) AppendMutable() protoreflect.Value {
|
|
v := new(VerificationMethod)
|
|
*x.list = append(*x.list, v)
|
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
|
}
|
|
|
|
func (x *_Document_2_list) Truncate(n int) {
|
|
for i := n; i < len(*x.list); i++ {
|
|
(*x.list)[i] = nil
|
|
}
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Document_2_list) NewElement() protoreflect.Value {
|
|
v := new(VerificationMethod)
|
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
|
}
|
|
|
|
func (x *_Document_2_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Document_4_list)(nil)
|
|
|
|
type _Document_4_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_Document_4_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Document_4_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_Document_4_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Document_4_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Document_4_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind"))
|
|
}
|
|
|
|
func (x *_Document_4_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Document_4_list) NewElement() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Document_4_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Document_5_list)(nil)
|
|
|
|
type _Document_5_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_Document_5_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Document_5_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_Document_5_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Document_5_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Document_5_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod 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_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 CapabilityDelegation 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 _ protoreflect.List = (*_Document_8_list)(nil)
|
|
|
|
type _Document_8_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_Document_8_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Document_8_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_Document_8_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Document_8_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Document_8_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_8_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Document_8_list) NewElement() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Document_8_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Document_9_list)(nil)
|
|
|
|
type _Document_9_list struct {
|
|
list *[]string
|
|
}
|
|
|
|
func (x *_Document_9_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Document_9_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfString((*x.list)[i])
|
|
}
|
|
|
|
func (x *_Document_9_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Document_9_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.String()
|
|
concreteValue := valueUnwrapped
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Document_9_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_9_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Document_9_list) NewElement() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Document_9_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var (
|
|
md_Document protoreflect.MessageDescriptor
|
|
fd_Document_id protoreflect.FieldDescriptor
|
|
fd_Document_verification_methods 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_verification_methods = md_Document.Fields().ByName("verification_methods")
|
|
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[3]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Document_messageType fastReflection_Document_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Document_messageType{}
|
|
|
|
type fastReflection_Document_messageType struct{}
|
|
|
|
func (x fastReflection_Document_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Document)(nil)
|
|
}
|
|
func (x fastReflection_Document_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Document)
|
|
}
|
|
func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Document
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Document
|
|
}
|
|
|
|
// Type returns the message type, which encapsulates both Go and protobuf
|
|
// type information. If the Go type information is not needed,
|
|
// it is recommended that the message descriptor be used instead.
|
|
func (x *fastReflection_Document) Type() protoreflect.MessageType {
|
|
return _fastReflection_Document_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Document) New() protoreflect.Message {
|
|
return new(fastReflection_Document)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage {
|
|
return (*Document)(x)
|
|
}
|
|
|
|
// Range iterates over every populated field in an undefined order,
|
|
// calling f for each field descriptor and value encountered.
|
|
// Range returns immediately if f returns false.
|
|
// While iterating, mutating operations may only be performed
|
|
// on the current field descriptor.
|
|
func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_Document_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.VerificationMethods) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_2_list{list: &x.VerificationMethods})
|
|
if !f(fd_Document_verification_methods, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Authentication) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_4_list{list: &x.Authentication})
|
|
if !f(fd_Document_authentication, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.AssertionMethod) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_5_list{list: &x.AssertionMethod})
|
|
if !f(fd_Document_assertion_method, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.CapabilityDelegation) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_7_list{list: &x.CapabilityDelegation})
|
|
if !f(fd_Document_capability_delegation, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.CapabilityInvocation) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_8_list{list: &x.CapabilityInvocation})
|
|
if !f(fd_Document_capability_invocation, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Service) != 0 {
|
|
value := protoreflect.ValueOfList(&_Document_9_list{list: &x.Service})
|
|
if !f(fd_Document_service, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Document.id":
|
|
return x.Id != ""
|
|
case "did.v1.Document.verification_methods":
|
|
return len(x.VerificationMethods) != 0
|
|
case "did.v1.Document.authentication":
|
|
return len(x.Authentication) != 0
|
|
case "did.v1.Document.assertion_method":
|
|
return len(x.AssertionMethod) != 0
|
|
case "did.v1.Document.capability_delegation":
|
|
return len(x.CapabilityDelegation) != 0
|
|
case "did.v1.Document.capability_invocation":
|
|
return len(x.CapabilityInvocation) != 0
|
|
case "did.v1.Document.service":
|
|
return len(x.Service) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Clear clears the field such that a subsequent Has call reports false.
|
|
//
|
|
// Clearing an extension field clears both the extension type and value
|
|
// associated with the given field number.
|
|
//
|
|
// Clear is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Document.id":
|
|
x.Id = ""
|
|
case "did.v1.Document.verification_methods":
|
|
x.VerificationMethods = nil
|
|
case "did.v1.Document.authentication":
|
|
x.Authentication = nil
|
|
case "did.v1.Document.assertion_method":
|
|
x.AssertionMethod = nil
|
|
case "did.v1.Document.capability_delegation":
|
|
x.CapabilityDelegation = nil
|
|
case "did.v1.Document.capability_invocation":
|
|
x.CapabilityInvocation = nil
|
|
case "did.v1.Document.service":
|
|
x.Service = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Get retrieves the value for a field.
|
|
//
|
|
// For unpopulated scalars, it returns the default value, where
|
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
|
// For unpopulated composite types, it returns an empty, read-only view
|
|
// of the value; to obtain a mutable reference, use Mutable.
|
|
func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Document.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Document.verification_methods":
|
|
if len(x.VerificationMethods) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_2_list{})
|
|
}
|
|
listValue := &_Document_2_list{list: &x.VerificationMethods}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Document.authentication":
|
|
if len(x.Authentication) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_4_list{})
|
|
}
|
|
listValue := &_Document_4_list{list: &x.Authentication}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Document.assertion_method":
|
|
if len(x.AssertionMethod) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_5_list{})
|
|
}
|
|
listValue := &_Document_5_list{list: &x.AssertionMethod}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Document.capability_delegation":
|
|
if len(x.CapabilityDelegation) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_7_list{})
|
|
}
|
|
listValue := &_Document_7_list{list: &x.CapabilityDelegation}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Document.capability_invocation":
|
|
if len(x.CapabilityInvocation) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_8_list{})
|
|
}
|
|
listValue := &_Document_8_list{list: &x.CapabilityInvocation}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Document.service":
|
|
if len(x.Service) == 0 {
|
|
return protoreflect.ValueOfList(&_Document_9_list{})
|
|
}
|
|
listValue := &_Document_9_list{list: &x.Service}
|
|
return protoreflect.ValueOfList(listValue)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName()))
|
|
}
|
|
}
|
|
|
|
// Set stores the value for a field.
|
|
//
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
|
// When setting a composite type, it is unspecified whether the stored value
|
|
// aliases the source's memory in any way. If the composite value is an
|
|
// empty, read-only value, then it panics.
|
|
//
|
|
// Set is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Document.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.Document.verification_methods":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_2_list)
|
|
x.VerificationMethods = *clv.list
|
|
case "did.v1.Document.authentication":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_4_list)
|
|
x.Authentication = *clv.list
|
|
case "did.v1.Document.assertion_method":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_5_list)
|
|
x.AssertionMethod = *clv.list
|
|
case "did.v1.Document.capability_delegation":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_7_list)
|
|
x.CapabilityDelegation = *clv.list
|
|
case "did.v1.Document.capability_invocation":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_8_list)
|
|
x.CapabilityInvocation = *clv.list
|
|
case "did.v1.Document.service":
|
|
lv := value.List()
|
|
clv := lv.(*_Document_9_list)
|
|
x.Service = *clv.list
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Mutable returns a mutable reference to a composite type.
|
|
//
|
|
// If the field is unpopulated, it may allocate a composite value.
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType
|
|
// if not already stored.
|
|
// It panics if the field does not contain a composite type.
|
|
//
|
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Document.verification_methods":
|
|
if x.VerificationMethods == nil {
|
|
x.VerificationMethods = []*VerificationMethod{}
|
|
}
|
|
value := &_Document_2_list{list: &x.VerificationMethods}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.authentication":
|
|
if x.Authentication == nil {
|
|
x.Authentication = []string{}
|
|
}
|
|
value := &_Document_4_list{list: &x.Authentication}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.assertion_method":
|
|
if x.AssertionMethod == nil {
|
|
x.AssertionMethod = []string{}
|
|
}
|
|
value := &_Document_5_list{list: &x.AssertionMethod}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.capability_delegation":
|
|
if x.CapabilityDelegation == nil {
|
|
x.CapabilityDelegation = []string{}
|
|
}
|
|
value := &_Document_7_list{list: &x.CapabilityDelegation}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.capability_invocation":
|
|
if x.CapabilityInvocation == nil {
|
|
x.CapabilityInvocation = []string{}
|
|
}
|
|
value := &_Document_8_list{list: &x.CapabilityInvocation}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.service":
|
|
if x.Service == nil {
|
|
x.Service = []string{}
|
|
}
|
|
value := &_Document_9_list{list: &x.Service}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Document.id":
|
|
panic(fmt.Errorf("field id of message did.v1.Document is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// NewField returns a new value that is assignable to the field
|
|
// for the given descriptor. For scalars, this returns the default value.
|
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
|
func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Document.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Document.verification_methods":
|
|
list := []*VerificationMethod{}
|
|
return protoreflect.ValueOfList(&_Document_2_list{list: &list})
|
|
case "did.v1.Document.authentication":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Document_4_list{list: &list})
|
|
case "did.v1.Document.assertion_method":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Document_5_list{list: &list})
|
|
case "did.v1.Document.capability_delegation":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Document_7_list{list: &list})
|
|
case "did.v1.Document.capability_invocation":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Document_8_list{list: &list})
|
|
case "did.v1.Document.service":
|
|
list := []string{}
|
|
return protoreflect.ValueOfList(&_Document_9_list{list: &list})
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// WhichOneof reports which field within the oneof is populated,
|
|
// returning nil if none are populated.
|
|
// It panics if the oneof descriptor does not belong to this message.
|
|
func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName()))
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
// GetUnknown retrieves the entire list of unknown fields.
|
|
// The caller may only mutate the contents of the RawFields
|
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
|
func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields {
|
|
return x.unknownFields
|
|
}
|
|
|
|
// SetUnknown stores an entire list of unknown fields.
|
|
// The raw fields must be syntactically valid according to the wire format.
|
|
// An implementation may panic if this is not the case.
|
|
// Once stored, the caller must not mutate the content of the RawFields.
|
|
// An empty RawFields may be passed to clear the fields.
|
|
//
|
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) {
|
|
x.unknownFields = fields
|
|
}
|
|
|
|
// IsValid reports whether the message is valid.
|
|
//
|
|
// An invalid message is an empty, read-only value.
|
|
//
|
|
// An invalid message often corresponds to a nil pointer of the concrete
|
|
// message type, but the details are implementation dependent.
|
|
// Validity is not part of the protobuf data model, and may not
|
|
// be preserved in marshaling or other operations.
|
|
func (x *fastReflection_Document) IsValid() bool {
|
|
return x != nil
|
|
}
|
|
|
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
|
// This method may return nil.
|
|
//
|
|
// The returned methods type is identical to
|
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
|
// Consult the protoiface package documentation for details.
|
|
func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Document)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if len(x.VerificationMethods) > 0 {
|
|
for _, e := range x.VerificationMethods {
|
|
l = options.Size(e)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if len(x.Authentication) > 0 {
|
|
for _, s := range x.Authentication {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if len(x.AssertionMethod) > 0 {
|
|
for _, s := range x.AssertionMethod {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if len(x.CapabilityDelegation) > 0 {
|
|
for _, s := range x.CapabilityDelegation {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if len(x.CapabilityInvocation) > 0 {
|
|
for _, s := range x.CapabilityInvocation {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if len(x.Service) > 0 {
|
|
for _, s := range x.Service {
|
|
l = len(s)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*Document)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if len(x.Service) > 0 {
|
|
for iNdEx := len(x.Service) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(x.Service[iNdEx])
|
|
copy(dAtA[i:], x.Service[iNdEx])
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Service[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x4a
|
|
}
|
|
}
|
|
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] = 0x42
|
|
}
|
|
}
|
|
if len(x.CapabilityDelegation) > 0 {
|
|
for iNdEx := len(x.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- {
|
|
i -= len(x.CapabilityDelegation[iNdEx])
|
|
copy(dAtA[i:], x.CapabilityDelegation[iNdEx])
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CapabilityDelegation[iNdEx])))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
}
|
|
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] = 0x2a
|
|
}
|
|
}
|
|
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] = 0x22
|
|
}
|
|
}
|
|
if len(x.VerificationMethods) > 0 {
|
|
for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- {
|
|
encoded, err := options.Marshal(x.VerificationMethods[iNdEx])
|
|
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] = 0x12
|
|
}
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Document)
|
|
if x == nil {
|
|
return protoiface.UnmarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Flags: input.Flags,
|
|
}, nil
|
|
}
|
|
options := runtime.UnmarshalInputToOptions(input)
|
|
_ = options
|
|
dAtA := input.Buf
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", 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
|
|
}
|
|
x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{})
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Authentication = append(x.Authentication, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.AssertionMethod = append(x.AssertionMethod, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 7:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.CapabilityDelegation = append(x.CapabilityDelegation, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 8:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.CapabilityInvocation = append(x.CapabilityInvocation, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
case 9:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Service = append(x.Service, string(dAtA[iNdEx:postIndex]))
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.Map = (*_Metadata_2_map)(nil)
|
|
|
|
type _Metadata_2_map struct {
|
|
m *map[string]string
|
|
}
|
|
|
|
func (x *_Metadata_2_map) Len() int {
|
|
if x.m == nil {
|
|
return 0
|
|
}
|
|
return len(*x.m)
|
|
}
|
|
|
|
func (x *_Metadata_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.ValueOfString(v)
|
|
if !f(mapKey, mapValue) {
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
func (x *_Metadata_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 *_Metadata_2_map) Clear(key protoreflect.MapKey) {
|
|
if x.m == nil {
|
|
return
|
|
}
|
|
keyUnwrapped := key.String()
|
|
concreteKey := keyUnwrapped
|
|
delete(*x.m, concreteKey)
|
|
}
|
|
|
|
func (x *_Metadata_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.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Metadata_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.String()
|
|
concreteValue := valueUnwrapped
|
|
(*x.m)[concreteKey] = concreteValue
|
|
}
|
|
|
|
func (x *_Metadata_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 *_Metadata_2_map) NewValue() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_Metadata_2_map) IsValid() bool {
|
|
return x.m != nil
|
|
}
|
|
|
|
var _ protoreflect.Map = (*_Metadata_3_map)(nil)
|
|
|
|
type _Metadata_3_map struct {
|
|
m *map[string]*Property
|
|
}
|
|
|
|
func (x *_Metadata_3_map) Len() int {
|
|
if x.m == nil {
|
|
return 0
|
|
}
|
|
return len(*x.m)
|
|
}
|
|
|
|
func (x *_Metadata_3_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.ValueOfMessage(v.ProtoReflect())
|
|
if !f(mapKey, mapValue) {
|
|
break
|
|
}
|
|
}
|
|
}
|
|
|
|
func (x *_Metadata_3_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 *_Metadata_3_map) Clear(key protoreflect.MapKey) {
|
|
if x.m == nil {
|
|
return
|
|
}
|
|
keyUnwrapped := key.String()
|
|
concreteKey := keyUnwrapped
|
|
delete(*x.m, concreteKey)
|
|
}
|
|
|
|
func (x *_Metadata_3_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.ValueOfMessage(v.ProtoReflect())
|
|
}
|
|
|
|
func (x *_Metadata_3_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.Message()
|
|
concreteValue := valueUnwrapped.Interface().(*Property)
|
|
(*x.m)[concreteKey] = concreteValue
|
|
}
|
|
|
|
func (x *_Metadata_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value {
|
|
keyUnwrapped := key.String()
|
|
concreteKey := keyUnwrapped
|
|
v, ok := (*x.m)[concreteKey]
|
|
if ok {
|
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
|
}
|
|
newValue := new(Property)
|
|
(*x.m)[concreteKey] = newValue
|
|
return protoreflect.ValueOfMessage(newValue.ProtoReflect())
|
|
}
|
|
|
|
func (x *_Metadata_3_map) NewValue() protoreflect.Value {
|
|
v := new(Property)
|
|
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
|
}
|
|
|
|
func (x *_Metadata_3_map) IsValid() bool {
|
|
return x.m != nil
|
|
}
|
|
|
|
var (
|
|
md_Metadata protoreflect.MessageDescriptor
|
|
fd_Metadata_origin_uri protoreflect.FieldDescriptor
|
|
fd_Metadata_public protoreflect.FieldDescriptor
|
|
fd_Metadata_private protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Metadata = File_did_v1_models_proto.Messages().ByName("Metadata")
|
|
fd_Metadata_origin_uri = md_Metadata.Fields().ByName("origin_uri")
|
|
fd_Metadata_public = md_Metadata.Fields().ByName("public")
|
|
fd_Metadata_private = md_Metadata.Fields().ByName("private")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Metadata)(nil)
|
|
|
|
type fastReflection_Metadata Metadata
|
|
|
|
func (x *Metadata) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Metadata)(x)
|
|
}
|
|
|
|
func (x *Metadata) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[4]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Metadata_messageType{}
|
|
|
|
type fastReflection_Metadata_messageType struct{}
|
|
|
|
func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Metadata)(nil)
|
|
}
|
|
func (x fastReflection_Metadata_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Metadata)
|
|
}
|
|
func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Metadata
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Metadata
|
|
}
|
|
|
|
// 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_Metadata) Type() protoreflect.MessageType {
|
|
return _fastReflection_Metadata_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Metadata) New() protoreflect.Message {
|
|
return new(fastReflection_Metadata)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage {
|
|
return (*Metadata)(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_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.OriginUri != "" {
|
|
value := protoreflect.ValueOfString(x.OriginUri)
|
|
if !f(fd_Metadata_origin_uri, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Public) != 0 {
|
|
value := protoreflect.ValueOfMap(&_Metadata_2_map{m: &x.Public})
|
|
if !f(fd_Metadata_public, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Private) != 0 {
|
|
value := protoreflect.ValueOfMap(&_Metadata_3_map{m: &x.Private})
|
|
if !f(fd_Metadata_private, 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_Metadata) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Metadata.origin_uri":
|
|
return x.OriginUri != ""
|
|
case "did.v1.Metadata.public":
|
|
return len(x.Public) != 0
|
|
case "did.v1.Metadata.private":
|
|
return len(x.Private) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Metadata.origin_uri":
|
|
x.OriginUri = ""
|
|
case "did.v1.Metadata.public":
|
|
x.Public = nil
|
|
case "did.v1.Metadata.private":
|
|
x.Private = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Metadata.origin_uri":
|
|
value := x.OriginUri
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Metadata.public":
|
|
if len(x.Public) == 0 {
|
|
return protoreflect.ValueOfMap(&_Metadata_2_map{})
|
|
}
|
|
mapValue := &_Metadata_2_map{m: &x.Public}
|
|
return protoreflect.ValueOfMap(mapValue)
|
|
case "did.v1.Metadata.private":
|
|
if len(x.Private) == 0 {
|
|
return protoreflect.ValueOfMap(&_Metadata_3_map{})
|
|
}
|
|
mapValue := &_Metadata_3_map{m: &x.Private}
|
|
return protoreflect.ValueOfMap(mapValue)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Metadata.origin_uri":
|
|
x.OriginUri = value.Interface().(string)
|
|
case "did.v1.Metadata.public":
|
|
mv := value.Map()
|
|
cmv := mv.(*_Metadata_2_map)
|
|
x.Public = *cmv.m
|
|
case "did.v1.Metadata.private":
|
|
mv := value.Map()
|
|
cmv := mv.(*_Metadata_3_map)
|
|
x.Private = *cmv.m
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Metadata.public":
|
|
if x.Public == nil {
|
|
x.Public = make(map[string]string)
|
|
}
|
|
value := &_Metadata_2_map{m: &x.Public}
|
|
return protoreflect.ValueOfMap(value)
|
|
case "did.v1.Metadata.private":
|
|
if x.Private == nil {
|
|
x.Private = make(map[string]*Property)
|
|
}
|
|
value := &_Metadata_3_map{m: &x.Private}
|
|
return protoreflect.ValueOfMap(value)
|
|
case "did.v1.Metadata.origin_uri":
|
|
panic(fmt.Errorf("field origin_uri of message did.v1.Metadata is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Metadata.origin_uri":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Metadata.public":
|
|
m := make(map[string]string)
|
|
return protoreflect.ValueOfMap(&_Metadata_2_map{m: &m})
|
|
case "did.v1.Metadata.private":
|
|
m := make(map[string]*Property)
|
|
return protoreflect.ValueOfMap(&_Metadata_3_map{m: &m})
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Metadata"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Metadata 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_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Metadata", 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_Metadata) 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_Metadata) 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_Metadata) 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_Metadata) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Metadata)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.OriginUri)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if len(x.Public) > 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.Public))
|
|
for k := range x.Public {
|
|
sortme = append(sortme, k)
|
|
}
|
|
sort.Strings(sortme)
|
|
for _, k := range sortme {
|
|
v := x.Public[k]
|
|
SiZeMaP(k, v)
|
|
}
|
|
} else {
|
|
for k, v := range x.Public {
|
|
SiZeMaP(k, v)
|
|
}
|
|
}
|
|
}
|
|
if len(x.Private) > 0 {
|
|
SiZeMaP := func(k string, v *Property) {
|
|
l := 0
|
|
if v != nil {
|
|
l = options.Size(v)
|
|
}
|
|
l += 1 + runtime.Sov(uint64(l))
|
|
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.Private))
|
|
for k := range x.Private {
|
|
sortme = append(sortme, k)
|
|
}
|
|
sort.Strings(sortme)
|
|
for _, k := range sortme {
|
|
v := x.Private[k]
|
|
SiZeMaP(k, v)
|
|
}
|
|
} else {
|
|
for k, v := range x.Private {
|
|
SiZeMaP(k, v)
|
|
}
|
|
}
|
|
}
|
|
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().(*Metadata)
|
|
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.Private) > 0 {
|
|
MaRsHaLmAp := func(k string, v *Property) (protoiface.MarshalOutput, error) {
|
|
baseI := i
|
|
encoded, err := options.Marshal(v)
|
|
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] = 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] = 0x1a
|
|
return protoiface.MarshalOutput{}, nil
|
|
}
|
|
if options.Deterministic {
|
|
keysForPrivate := make([]string, 0, len(x.Private))
|
|
for k := range x.Private {
|
|
keysForPrivate = append(keysForPrivate, string(k))
|
|
}
|
|
sort.Slice(keysForPrivate, func(i, j int) bool {
|
|
return keysForPrivate[i] < keysForPrivate[j]
|
|
})
|
|
for iNdEx := len(keysForPrivate) - 1; iNdEx >= 0; iNdEx-- {
|
|
v := x.Private[string(keysForPrivate[iNdEx])]
|
|
out, err := MaRsHaLmAp(keysForPrivate[iNdEx], v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
} else {
|
|
for k := range x.Private {
|
|
v := x.Private[k]
|
|
out, err := MaRsHaLmAp(k, v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if len(x.Public) > 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] = 0x12
|
|
return protoiface.MarshalOutput{}, nil
|
|
}
|
|
if options.Deterministic {
|
|
keysForPublic := make([]string, 0, len(x.Public))
|
|
for k := range x.Public {
|
|
keysForPublic = append(keysForPublic, string(k))
|
|
}
|
|
sort.Slice(keysForPublic, func(i, j int) bool {
|
|
return keysForPublic[i] < keysForPublic[j]
|
|
})
|
|
for iNdEx := len(keysForPublic) - 1; iNdEx >= 0; iNdEx-- {
|
|
v := x.Public[string(keysForPublic[iNdEx])]
|
|
out, err := MaRsHaLmAp(keysForPublic[iNdEx], v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
} else {
|
|
for k := range x.Public {
|
|
v := x.Public[k]
|
|
out, err := MaRsHaLmAp(k, v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if len(x.OriginUri) > 0 {
|
|
i -= len(x.OriginUri)
|
|
copy(dAtA[i:], x.OriginUri)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri)))
|
|
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().(*Metadata)
|
|
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: Metadata: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: 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 OriginUri", 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.OriginUri = 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 Public", 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.Public == nil {
|
|
x.Public = 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.Public[mapkey] = mapvalue
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Private", 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.Private == nil {
|
|
x.Private = make(map[string]*Property)
|
|
}
|
|
var mapkey string
|
|
var mapvalue *Property
|
|
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 mapmsglen 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++
|
|
mapmsglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if mapmsglen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postmsgIndex := iNdEx + mapmsglen
|
|
if postmsgIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postmsgIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
mapvalue = &Property{}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postmsgIndex
|
|
} 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.Private[mapkey] = mapvalue
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Permissions_1_list)(nil)
|
|
|
|
type _Permissions_1_list struct {
|
|
list *[]DIDNamespace
|
|
}
|
|
|
|
func (x *_Permissions_1_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Permissions_1_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i]))
|
|
}
|
|
|
|
func (x *_Permissions_1_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.Enum()
|
|
concreteValue := (DIDNamespace)(valueUnwrapped)
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Permissions_1_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.Enum()
|
|
concreteValue := (DIDNamespace)(valueUnwrapped)
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Permissions_1_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Grants as it is not of Message kind"))
|
|
}
|
|
|
|
func (x *_Permissions_1_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Permissions_1_list) NewElement() protoreflect.Value {
|
|
v := 0
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v))
|
|
}
|
|
|
|
func (x *_Permissions_1_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var _ protoreflect.List = (*_Permissions_2_list)(nil)
|
|
|
|
type _Permissions_2_list struct {
|
|
list *[]PermissionScope
|
|
}
|
|
|
|
func (x *_Permissions_2_list) Len() int {
|
|
if x.list == nil {
|
|
return 0
|
|
}
|
|
return len(*x.list)
|
|
}
|
|
|
|
func (x *_Permissions_2_list) Get(i int) protoreflect.Value {
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i]))
|
|
}
|
|
|
|
func (x *_Permissions_2_list) Set(i int, value protoreflect.Value) {
|
|
valueUnwrapped := value.Enum()
|
|
concreteValue := (PermissionScope)(valueUnwrapped)
|
|
(*x.list)[i] = concreteValue
|
|
}
|
|
|
|
func (x *_Permissions_2_list) Append(value protoreflect.Value) {
|
|
valueUnwrapped := value.Enum()
|
|
concreteValue := (PermissionScope)(valueUnwrapped)
|
|
*x.list = append(*x.list, concreteValue)
|
|
}
|
|
|
|
func (x *_Permissions_2_list) AppendMutable() protoreflect.Value {
|
|
panic(fmt.Errorf("AppendMutable can not be called on message Permissions at list field Scopes as it is not of Message kind"))
|
|
}
|
|
|
|
func (x *_Permissions_2_list) Truncate(n int) {
|
|
*x.list = (*x.list)[:n]
|
|
}
|
|
|
|
func (x *_Permissions_2_list) NewElement() protoreflect.Value {
|
|
v := 0
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v))
|
|
}
|
|
|
|
func (x *_Permissions_2_list) IsValid() bool {
|
|
return x.list != nil
|
|
}
|
|
|
|
var (
|
|
md_Permissions protoreflect.MessageDescriptor
|
|
fd_Permissions_grants protoreflect.FieldDescriptor
|
|
fd_Permissions_scopes protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Permissions = File_did_v1_models_proto.Messages().ByName("Permissions")
|
|
fd_Permissions_grants = md_Permissions.Fields().ByName("grants")
|
|
fd_Permissions_scopes = md_Permissions.Fields().ByName("scopes")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Permissions)(nil)
|
|
|
|
type fastReflection_Permissions Permissions
|
|
|
|
func (x *Permissions) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Permissions)(x)
|
|
}
|
|
|
|
func (x *Permissions) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[5]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Permissions_messageType fastReflection_Permissions_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Permissions_messageType{}
|
|
|
|
type fastReflection_Permissions_messageType struct{}
|
|
|
|
func (x fastReflection_Permissions_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Permissions)(nil)
|
|
}
|
|
func (x fastReflection_Permissions_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Permissions)
|
|
}
|
|
func (x fastReflection_Permissions_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Permissions
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Permissions) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Permissions
|
|
}
|
|
|
|
// Type returns the message type, which encapsulates both Go and protobuf
|
|
// type information. If the Go type information is not needed,
|
|
// it is recommended that the message descriptor be used instead.
|
|
func (x *fastReflection_Permissions) Type() protoreflect.MessageType {
|
|
return _fastReflection_Permissions_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Permissions) New() protoreflect.Message {
|
|
return new(fastReflection_Permissions)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Permissions) Interface() protoreflect.ProtoMessage {
|
|
return (*Permissions)(x)
|
|
}
|
|
|
|
// Range iterates over every populated field in an undefined order,
|
|
// calling f for each field descriptor and value encountered.
|
|
// Range returns immediately if f returns false.
|
|
// While iterating, mutating operations may only be performed
|
|
// on the current field descriptor.
|
|
func (x *fastReflection_Permissions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if len(x.Grants) != 0 {
|
|
value := protoreflect.ValueOfList(&_Permissions_1_list{list: &x.Grants})
|
|
if !f(fd_Permissions_grants, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Scopes) != 0 {
|
|
value := protoreflect.ValueOfList(&_Permissions_2_list{list: &x.Scopes})
|
|
if !f(fd_Permissions_scopes, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_Permissions) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
return len(x.Grants) != 0
|
|
case "did.v1.Permissions.scopes":
|
|
return len(x.Scopes) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Clear clears the field such that a subsequent Has call reports false.
|
|
//
|
|
// Clearing an extension field clears both the extension type and value
|
|
// associated with the given field number.
|
|
//
|
|
// Clear is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Permissions) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
x.Grants = nil
|
|
case "did.v1.Permissions.scopes":
|
|
x.Scopes = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Get retrieves the value for a field.
|
|
//
|
|
// For unpopulated scalars, it returns the default value, where
|
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
|
// For unpopulated composite types, it returns an empty, read-only view
|
|
// of the value; to obtain a mutable reference, use Mutable.
|
|
func (x *fastReflection_Permissions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
if len(x.Grants) == 0 {
|
|
return protoreflect.ValueOfList(&_Permissions_1_list{})
|
|
}
|
|
listValue := &_Permissions_1_list{list: &x.Grants}
|
|
return protoreflect.ValueOfList(listValue)
|
|
case "did.v1.Permissions.scopes":
|
|
if len(x.Scopes) == 0 {
|
|
return protoreflect.ValueOfList(&_Permissions_2_list{})
|
|
}
|
|
listValue := &_Permissions_2_list{list: &x.Scopes}
|
|
return protoreflect.ValueOfList(listValue)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", descriptor.FullName()))
|
|
}
|
|
}
|
|
|
|
// Set stores the value for a field.
|
|
//
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
|
// When setting a composite type, it is unspecified whether the stored value
|
|
// aliases the source's memory in any way. If the composite value is an
|
|
// empty, read-only value, then it panics.
|
|
//
|
|
// Set is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Permissions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
lv := value.List()
|
|
clv := lv.(*_Permissions_1_list)
|
|
x.Grants = *clv.list
|
|
case "did.v1.Permissions.scopes":
|
|
lv := value.List()
|
|
clv := lv.(*_Permissions_2_list)
|
|
x.Scopes = *clv.list
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Mutable returns a mutable reference to a composite type.
|
|
//
|
|
// If the field is unpopulated, it may allocate a composite value.
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType
|
|
// if not already stored.
|
|
// It panics if the field does not contain a composite type.
|
|
//
|
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Permissions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
if x.Grants == nil {
|
|
x.Grants = []DIDNamespace{}
|
|
}
|
|
value := &_Permissions_1_list{list: &x.Grants}
|
|
return protoreflect.ValueOfList(value)
|
|
case "did.v1.Permissions.scopes":
|
|
if x.Scopes == nil {
|
|
x.Scopes = []PermissionScope{}
|
|
}
|
|
value := &_Permissions_2_list{list: &x.Scopes}
|
|
return protoreflect.ValueOfList(value)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// NewField returns a new value that is assignable to the field
|
|
// for the given descriptor. For scalars, this returns the default value.
|
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
|
func (x *fastReflection_Permissions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Permissions.grants":
|
|
list := []DIDNamespace{}
|
|
return protoreflect.ValueOfList(&_Permissions_1_list{list: &list})
|
|
case "did.v1.Permissions.scopes":
|
|
list := []PermissionScope{}
|
|
return protoreflect.ValueOfList(&_Permissions_2_list{list: &list})
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Permissions"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Permissions does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// WhichOneof reports which field within the oneof is populated,
|
|
// returning nil if none are populated.
|
|
// It panics if the oneof descriptor does not belong to this message.
|
|
func (x *fastReflection_Permissions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Permissions", d.FullName()))
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
// GetUnknown retrieves the entire list of unknown fields.
|
|
// The caller may only mutate the contents of the RawFields
|
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
|
func (x *fastReflection_Permissions) GetUnknown() protoreflect.RawFields {
|
|
return x.unknownFields
|
|
}
|
|
|
|
// SetUnknown stores an entire list of unknown fields.
|
|
// The raw fields must be syntactically valid according to the wire format.
|
|
// An implementation may panic if this is not the case.
|
|
// Once stored, the caller must not mutate the content of the RawFields.
|
|
// An empty RawFields may be passed to clear the fields.
|
|
//
|
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Permissions) SetUnknown(fields protoreflect.RawFields) {
|
|
x.unknownFields = fields
|
|
}
|
|
|
|
// IsValid reports whether the message is valid.
|
|
//
|
|
// An invalid message is an empty, read-only value.
|
|
//
|
|
// An invalid message often corresponds to a nil pointer of the concrete
|
|
// message type, but the details are implementation dependent.
|
|
// Validity is not part of the protobuf data model, and may not
|
|
// be preserved in marshaling or other operations.
|
|
func (x *fastReflection_Permissions) IsValid() bool {
|
|
return x != nil
|
|
}
|
|
|
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
|
// This method may return nil.
|
|
//
|
|
// The returned methods type is identical to
|
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
|
// Consult the protoiface package documentation for details.
|
|
func (x *fastReflection_Permissions) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Permissions)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
if len(x.Grants) > 0 {
|
|
l = 0
|
|
for _, e := range x.Grants {
|
|
l += runtime.Sov(uint64(e))
|
|
}
|
|
n += 1 + runtime.Sov(uint64(l)) + l
|
|
}
|
|
if len(x.Scopes) > 0 {
|
|
l = 0
|
|
for _, e := range x.Scopes {
|
|
l += runtime.Sov(uint64(e))
|
|
}
|
|
n += 1 + runtime.Sov(uint64(l)) + l
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*Permissions)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if len(x.Scopes) > 0 {
|
|
var pksize2 int
|
|
for _, num := range x.Scopes {
|
|
pksize2 += runtime.Sov(uint64(num))
|
|
}
|
|
i -= pksize2
|
|
j1 := i
|
|
for _, num1 := range x.Scopes {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j1++
|
|
}
|
|
dAtA[j1] = uint8(num)
|
|
j1++
|
|
}
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(pksize2))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Grants) > 0 {
|
|
var pksize4 int
|
|
for _, num := range x.Grants {
|
|
pksize4 += runtime.Sov(uint64(num))
|
|
}
|
|
i -= pksize4
|
|
j3 := i
|
|
for _, num1 := range x.Grants {
|
|
num := uint64(num1)
|
|
for num >= 1<<7 {
|
|
dAtA[j3] = uint8(uint64(num)&0x7f | 0x80)
|
|
num >>= 7
|
|
j3++
|
|
}
|
|
dAtA[j3] = uint8(num)
|
|
j3++
|
|
}
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(pksize4))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Permissions)
|
|
if x == nil {
|
|
return protoiface.UnmarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Flags: input.Flags,
|
|
}, nil
|
|
}
|
|
options := runtime.UnmarshalInputToOptions(input)
|
|
_ = options
|
|
dAtA := input.Buf
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Permissions: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType == 0 {
|
|
var v DIDNamespace
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= DIDNamespace(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
x.Grants = append(x.Grants, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
if elementCount != 0 && len(x.Grants) == 0 {
|
|
x.Grants = make([]DIDNamespace, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v DIDNamespace
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= DIDNamespace(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
x.Grants = append(x.Grants, v)
|
|
}
|
|
} else {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
|
|
}
|
|
case 2:
|
|
if wireType == 0 {
|
|
var v PermissionScope
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= PermissionScope(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
x.Scopes = append(x.Scopes, v)
|
|
} else if wireType == 2 {
|
|
var packedLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
packedLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if packedLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + packedLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
var elementCount int
|
|
if elementCount != 0 && len(x.Scopes) == 0 {
|
|
x.Scopes = make([]PermissionScope, 0, elementCount)
|
|
}
|
|
for iNdEx < postIndex {
|
|
var v PermissionScope
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= PermissionScope(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
x.Scopes = append(x.Scopes, v)
|
|
}
|
|
} else {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
|
|
}
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var (
|
|
md_Profile protoreflect.MessageDescriptor
|
|
fd_Profile_id protoreflect.FieldDescriptor
|
|
fd_Profile_subject protoreflect.FieldDescriptor
|
|
fd_Profile_controller protoreflect.FieldDescriptor
|
|
fd_Profile_metadata protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Profile = File_did_v1_models_proto.Messages().ByName("Profile")
|
|
fd_Profile_id = md_Profile.Fields().ByName("id")
|
|
fd_Profile_subject = md_Profile.Fields().ByName("subject")
|
|
fd_Profile_controller = md_Profile.Fields().ByName("controller")
|
|
fd_Profile_metadata = md_Profile.Fields().ByName("metadata")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Profile)(nil)
|
|
|
|
type fastReflection_Profile Profile
|
|
|
|
func (x *Profile) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Profile)(x)
|
|
}
|
|
|
|
func (x *Profile) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[6]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Profile_messageType fastReflection_Profile_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Profile_messageType{}
|
|
|
|
type fastReflection_Profile_messageType struct{}
|
|
|
|
func (x fastReflection_Profile_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Profile)(nil)
|
|
}
|
|
func (x fastReflection_Profile_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Profile)
|
|
}
|
|
func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Profile
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Profile
|
|
}
|
|
|
|
// 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_Profile) Type() protoreflect.MessageType {
|
|
return _fastReflection_Profile_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Profile) New() protoreflect.Message {
|
|
return new(fastReflection_Profile)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage {
|
|
return (*Profile)(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_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_Profile_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Subject != "" {
|
|
value := protoreflect.ValueOfString(x.Subject)
|
|
if !f(fd_Profile_subject, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Controller != "" {
|
|
value := protoreflect.ValueOfString(x.Controller)
|
|
if !f(fd_Profile_controller, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Metadata != nil {
|
|
value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect())
|
|
if !f(fd_Profile_metadata, 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_Profile) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Profile.id":
|
|
return x.Id != ""
|
|
case "did.v1.Profile.subject":
|
|
return x.Subject != ""
|
|
case "did.v1.Profile.controller":
|
|
return x.Controller != ""
|
|
case "did.v1.Profile.metadata":
|
|
return x.Metadata != nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Profile.id":
|
|
x.Id = ""
|
|
case "did.v1.Profile.subject":
|
|
x.Subject = ""
|
|
case "did.v1.Profile.controller":
|
|
x.Controller = ""
|
|
case "did.v1.Profile.metadata":
|
|
x.Metadata = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Profile.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Profile.subject":
|
|
value := x.Subject
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Profile.controller":
|
|
value := x.Controller
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Profile.metadata":
|
|
value := x.Metadata
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Profile.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.Profile.subject":
|
|
x.Subject = value.Interface().(string)
|
|
case "did.v1.Profile.controller":
|
|
x.Controller = value.Interface().(string)
|
|
case "did.v1.Profile.metadata":
|
|
x.Metadata = value.Message().Interface().(*Metadata)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Profile.metadata":
|
|
if x.Metadata == nil {
|
|
x.Metadata = new(Metadata)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect())
|
|
case "did.v1.Profile.id":
|
|
panic(fmt.Errorf("field id of message did.v1.Profile is not mutable"))
|
|
case "did.v1.Profile.subject":
|
|
panic(fmt.Errorf("field subject of message did.v1.Profile is not mutable"))
|
|
case "did.v1.Profile.controller":
|
|
panic(fmt.Errorf("field controller of message did.v1.Profile is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Profile.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Profile.subject":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Profile.controller":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Profile.metadata":
|
|
m := new(Metadata)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Profile"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Profile 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_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Profile", 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_Profile) 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_Profile) 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_Profile) 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_Profile) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Profile)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Subject)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Controller)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Metadata != nil {
|
|
l = options.Size(x.Metadata)
|
|
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().(*Profile)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if x.Metadata != nil {
|
|
encoded, err := options.Marshal(x.Metadata)
|
|
if err != nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, err
|
|
}
|
|
i -= len(encoded)
|
|
copy(dAtA[i:], encoded)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if len(x.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.Subject) > 0 {
|
|
i -= len(x.Subject)
|
|
copy(dAtA[i:], x.Subject)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Profile)
|
|
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: Profile: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Subject = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Controller = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
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 = &Metadata{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var (
|
|
md_Property protoreflect.MessageDescriptor
|
|
fd_Property_accumulator protoreflect.FieldDescriptor
|
|
fd_Property_key protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Property = File_did_v1_models_proto.Messages().ByName("Property")
|
|
fd_Property_accumulator = md_Property.Fields().ByName("accumulator")
|
|
fd_Property_key = md_Property.Fields().ByName("key")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Property)(nil)
|
|
|
|
type fastReflection_Property Property
|
|
|
|
func (x *Property) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Property)(x)
|
|
}
|
|
|
|
func (x *Property) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[7]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Property_messageType fastReflection_Property_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Property_messageType{}
|
|
|
|
type fastReflection_Property_messageType struct{}
|
|
|
|
func (x fastReflection_Property_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Property)(nil)
|
|
}
|
|
func (x fastReflection_Property_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Property)
|
|
}
|
|
func (x fastReflection_Property_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Property
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Property) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Property
|
|
}
|
|
|
|
// 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_Property) Type() protoreflect.MessageType {
|
|
return _fastReflection_Property_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Property) New() protoreflect.Message {
|
|
return new(fastReflection_Property)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Property) Interface() protoreflect.ProtoMessage {
|
|
return (*Property)(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_Property) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if len(x.Accumulator) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Accumulator)
|
|
if !f(fd_Property_accumulator, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Key) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Key)
|
|
if !f(fd_Property_key, 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_Property) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
return len(x.Accumulator) != 0
|
|
case "did.v1.Property.key":
|
|
return len(x.Key) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
x.Accumulator = nil
|
|
case "did.v1.Property.key":
|
|
x.Key = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
value := x.Accumulator
|
|
return protoreflect.ValueOfBytes(value)
|
|
case "did.v1.Property.key":
|
|
value := x.Key
|
|
return protoreflect.ValueOfBytes(value)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
x.Accumulator = value.Bytes()
|
|
case "did.v1.Property.key":
|
|
x.Key = value.Bytes()
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
panic(fmt.Errorf("field accumulator of message did.v1.Property is not mutable"))
|
|
case "did.v1.Property.key":
|
|
panic(fmt.Errorf("field key of message did.v1.Property is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Property.accumulator":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
case "did.v1.Property.key":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Property"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Property 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_Property) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Property", 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_Property) 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_Property) 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_Property) 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_Property) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Property)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Accumulator)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Key)
|
|
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().(*Property)
|
|
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.Key) > 0 {
|
|
i -= len(x.Key)
|
|
copy(dAtA[i:], x.Key)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Accumulator) > 0 {
|
|
i -= len(x.Accumulator)
|
|
copy(dAtA[i:], x.Accumulator)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator)))
|
|
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().(*Property)
|
|
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: Property: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Property: 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 Accumulator", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Accumulator == nil {
|
|
x.Accumulator = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Key == nil {
|
|
x.Key = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var _ protoreflect.Map = (*_PubKey_7_map)(nil)
|
|
|
|
type _PubKey_7_map struct {
|
|
m *map[string]string
|
|
}
|
|
|
|
func (x *_PubKey_7_map) Len() int {
|
|
if x.m == nil {
|
|
return 0
|
|
}
|
|
return len(*x.m)
|
|
}
|
|
|
|
func (x *_PubKey_7_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 *_PubKey_7_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 *_PubKey_7_map) Clear(key protoreflect.MapKey) {
|
|
if x.m == nil {
|
|
return
|
|
}
|
|
keyUnwrapped := key.String()
|
|
concreteKey := keyUnwrapped
|
|
delete(*x.m, concreteKey)
|
|
}
|
|
|
|
func (x *_PubKey_7_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 *_PubKey_7_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 *_PubKey_7_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 *_PubKey_7_map) NewValue() protoreflect.Value {
|
|
v := ""
|
|
return protoreflect.ValueOfString(v)
|
|
}
|
|
|
|
func (x *_PubKey_7_map) IsValid() bool {
|
|
return x.m != nil
|
|
}
|
|
|
|
var (
|
|
md_PubKey protoreflect.MessageDescriptor
|
|
fd_PubKey_role protoreflect.FieldDescriptor
|
|
fd_PubKey_algorithm protoreflect.FieldDescriptor
|
|
fd_PubKey_encoding protoreflect.FieldDescriptor
|
|
fd_PubKey_raw protoreflect.FieldDescriptor
|
|
fd_PubKey_hex protoreflect.FieldDescriptor
|
|
fd_PubKey_multibase protoreflect.FieldDescriptor
|
|
fd_PubKey_jwk protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_PubKey = File_did_v1_models_proto.Messages().ByName("PubKey")
|
|
fd_PubKey_role = md_PubKey.Fields().ByName("role")
|
|
fd_PubKey_algorithm = md_PubKey.Fields().ByName("algorithm")
|
|
fd_PubKey_encoding = md_PubKey.Fields().ByName("encoding")
|
|
fd_PubKey_raw = md_PubKey.Fields().ByName("raw")
|
|
fd_PubKey_hex = md_PubKey.Fields().ByName("hex")
|
|
fd_PubKey_multibase = md_PubKey.Fields().ByName("multibase")
|
|
fd_PubKey_jwk = md_PubKey.Fields().ByName("jwk")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_PubKey)(nil)
|
|
|
|
type fastReflection_PubKey PubKey
|
|
|
|
func (x *PubKey) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_PubKey)(x)
|
|
}
|
|
|
|
func (x *PubKey) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[8]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType
|
|
var _ protoreflect.MessageType = fastReflection_PubKey_messageType{}
|
|
|
|
type fastReflection_PubKey_messageType struct{}
|
|
|
|
func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_PubKey)(nil)
|
|
}
|
|
func (x fastReflection_PubKey_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_PubKey)
|
|
}
|
|
func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_PubKey
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_PubKey
|
|
}
|
|
|
|
// Type returns the message type, which encapsulates both Go and protobuf
|
|
// type information. If the Go type information is not needed,
|
|
// it is recommended that the message descriptor be used instead.
|
|
func (x *fastReflection_PubKey) Type() protoreflect.MessageType {
|
|
return _fastReflection_PubKey_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_PubKey) New() protoreflect.Message {
|
|
return new(fastReflection_PubKey)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage {
|
|
return (*PubKey)(x)
|
|
}
|
|
|
|
// Range iterates over every populated field in an undefined order,
|
|
// calling f for each field descriptor and value encountered.
|
|
// Range returns immediately if f returns false.
|
|
// While iterating, mutating operations may only be performed
|
|
// on the current field descriptor.
|
|
func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Role != 0 {
|
|
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role))
|
|
if !f(fd_PubKey_role, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Algorithm != 0 {
|
|
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm))
|
|
if !f(fd_PubKey_algorithm, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Encoding != 0 {
|
|
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding))
|
|
if !f(fd_PubKey_encoding, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Raw) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Raw)
|
|
if !f(fd_PubKey_raw, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Hex != "" {
|
|
value := protoreflect.ValueOfString(x.Hex)
|
|
if !f(fd_PubKey_hex, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Multibase != "" {
|
|
value := protoreflect.ValueOfString(x.Multibase)
|
|
if !f(fd_PubKey_multibase, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Jwk) != 0 {
|
|
value := protoreflect.ValueOfMap(&_PubKey_7_map{m: &x.Jwk})
|
|
if !f(fd_PubKey_jwk, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.PubKey.role":
|
|
return x.Role != 0
|
|
case "did.v1.PubKey.algorithm":
|
|
return x.Algorithm != 0
|
|
case "did.v1.PubKey.encoding":
|
|
return x.Encoding != 0
|
|
case "did.v1.PubKey.raw":
|
|
return len(x.Raw) != 0
|
|
case "did.v1.PubKey.hex":
|
|
return x.Hex != ""
|
|
case "did.v1.PubKey.multibase":
|
|
return x.Multibase != ""
|
|
case "did.v1.PubKey.jwk":
|
|
return len(x.Jwk) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Clear clears the field such that a subsequent Has call reports false.
|
|
//
|
|
// Clearing an extension field clears both the extension type and value
|
|
// associated with the given field number.
|
|
//
|
|
// Clear is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.PubKey.role":
|
|
x.Role = 0
|
|
case "did.v1.PubKey.algorithm":
|
|
x.Algorithm = 0
|
|
case "did.v1.PubKey.encoding":
|
|
x.Encoding = 0
|
|
case "did.v1.PubKey.raw":
|
|
x.Raw = nil
|
|
case "did.v1.PubKey.hex":
|
|
x.Hex = ""
|
|
case "did.v1.PubKey.multibase":
|
|
x.Multibase = ""
|
|
case "did.v1.PubKey.jwk":
|
|
x.Jwk = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Get retrieves the value for a field.
|
|
//
|
|
// For unpopulated scalars, it returns the default value, where
|
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
|
// For unpopulated composite types, it returns an empty, read-only view
|
|
// of the value; to obtain a mutable reference, use Mutable.
|
|
func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.PubKey.role":
|
|
value := x.Role
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
|
|
case "did.v1.PubKey.algorithm":
|
|
value := x.Algorithm
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
|
|
case "did.v1.PubKey.encoding":
|
|
value := x.Encoding
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
|
|
case "did.v1.PubKey.raw":
|
|
value := x.Raw
|
|
return protoreflect.ValueOfBytes(value)
|
|
case "did.v1.PubKey.hex":
|
|
value := x.Hex
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.PubKey.multibase":
|
|
value := x.Multibase
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.PubKey.jwk":
|
|
if len(x.Jwk) == 0 {
|
|
return protoreflect.ValueOfMap(&_PubKey_7_map{})
|
|
}
|
|
mapValue := &_PubKey_7_map{m: &x.Jwk}
|
|
return protoreflect.ValueOfMap(mapValue)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName()))
|
|
}
|
|
}
|
|
|
|
// Set stores the value for a field.
|
|
//
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
|
// When setting a composite type, it is unspecified whether the stored value
|
|
// aliases the source's memory in any way. If the composite value is an
|
|
// empty, read-only value, then it panics.
|
|
//
|
|
// Set is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.PubKey.role":
|
|
x.Role = (KeyRole)(value.Enum())
|
|
case "did.v1.PubKey.algorithm":
|
|
x.Algorithm = (KeyAlgorithm)(value.Enum())
|
|
case "did.v1.PubKey.encoding":
|
|
x.Encoding = (KeyEncoding)(value.Enum())
|
|
case "did.v1.PubKey.raw":
|
|
x.Raw = value.Bytes()
|
|
case "did.v1.PubKey.hex":
|
|
x.Hex = value.Interface().(string)
|
|
case "did.v1.PubKey.multibase":
|
|
x.Multibase = value.Interface().(string)
|
|
case "did.v1.PubKey.jwk":
|
|
mv := value.Map()
|
|
cmv := mv.(*_PubKey_7_map)
|
|
x.Jwk = *cmv.m
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Mutable returns a mutable reference to a composite type.
|
|
//
|
|
// If the field is unpopulated, it may allocate a composite value.
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType
|
|
// if not already stored.
|
|
// It panics if the field does not contain a composite type.
|
|
//
|
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.PubKey.jwk":
|
|
if x.Jwk == nil {
|
|
x.Jwk = make(map[string]string)
|
|
}
|
|
value := &_PubKey_7_map{m: &x.Jwk}
|
|
return protoreflect.ValueOfMap(value)
|
|
case "did.v1.PubKey.role":
|
|
panic(fmt.Errorf("field role of message did.v1.PubKey is not mutable"))
|
|
case "did.v1.PubKey.algorithm":
|
|
panic(fmt.Errorf("field algorithm of message did.v1.PubKey is not mutable"))
|
|
case "did.v1.PubKey.encoding":
|
|
panic(fmt.Errorf("field encoding of message did.v1.PubKey is not mutable"))
|
|
case "did.v1.PubKey.raw":
|
|
panic(fmt.Errorf("field raw of message did.v1.PubKey is not mutable"))
|
|
case "did.v1.PubKey.hex":
|
|
panic(fmt.Errorf("field hex of message did.v1.PubKey is not mutable"))
|
|
case "did.v1.PubKey.multibase":
|
|
panic(fmt.Errorf("field multibase of message did.v1.PubKey is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// NewField returns a new value that is assignable to the field
|
|
// for the given descriptor. For scalars, this returns the default value.
|
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
|
func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.PubKey.role":
|
|
return protoreflect.ValueOfEnum(0)
|
|
case "did.v1.PubKey.algorithm":
|
|
return protoreflect.ValueOfEnum(0)
|
|
case "did.v1.PubKey.encoding":
|
|
return protoreflect.ValueOfEnum(0)
|
|
case "did.v1.PubKey.raw":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
case "did.v1.PubKey.hex":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.PubKey.multibase":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.PubKey.jwk":
|
|
m := make(map[string]string)
|
|
return protoreflect.ValueOfMap(&_PubKey_7_map{m: &m})
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// WhichOneof reports which field within the oneof is populated,
|
|
// returning nil if none are populated.
|
|
// It panics if the oneof descriptor does not belong to this message.
|
|
func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName()))
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
// GetUnknown retrieves the entire list of unknown fields.
|
|
// The caller may only mutate the contents of the RawFields
|
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
|
func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields {
|
|
return x.unknownFields
|
|
}
|
|
|
|
// SetUnknown stores an entire list of unknown fields.
|
|
// The raw fields must be syntactically valid according to the wire format.
|
|
// An implementation may panic if this is not the case.
|
|
// Once stored, the caller must not mutate the content of the RawFields.
|
|
// An empty RawFields may be passed to clear the fields.
|
|
//
|
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) {
|
|
x.unknownFields = fields
|
|
}
|
|
|
|
// IsValid reports whether the message is valid.
|
|
//
|
|
// An invalid message is an empty, read-only value.
|
|
//
|
|
// An invalid message often corresponds to a nil pointer of the concrete
|
|
// message type, but the details are implementation dependent.
|
|
// Validity is not part of the protobuf data model, and may not
|
|
// be preserved in marshaling or other operations.
|
|
func (x *fastReflection_PubKey) IsValid() bool {
|
|
return x != nil
|
|
}
|
|
|
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
|
// This method may return nil.
|
|
//
|
|
// The returned methods type is identical to
|
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
|
// Consult the protoiface package documentation for details.
|
|
func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*PubKey)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
if x.Role != 0 {
|
|
n += 1 + runtime.Sov(uint64(x.Role))
|
|
}
|
|
if x.Algorithm != 0 {
|
|
n += 1 + runtime.Sov(uint64(x.Algorithm))
|
|
}
|
|
if x.Encoding != 0 {
|
|
n += 1 + runtime.Sov(uint64(x.Encoding))
|
|
}
|
|
l = len(x.Raw)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Hex)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Multibase)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if len(x.Jwk) > 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.Jwk))
|
|
for k := range x.Jwk {
|
|
sortme = append(sortme, k)
|
|
}
|
|
sort.Strings(sortme)
|
|
for _, k := range sortme {
|
|
v := x.Jwk[k]
|
|
SiZeMaP(k, v)
|
|
}
|
|
} else {
|
|
for k, v := range x.Jwk {
|
|
SiZeMaP(k, v)
|
|
}
|
|
}
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*PubKey)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if len(x.Jwk) > 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] = 0x3a
|
|
return protoiface.MarshalOutput{}, nil
|
|
}
|
|
if options.Deterministic {
|
|
keysForJwk := make([]string, 0, len(x.Jwk))
|
|
for k := range x.Jwk {
|
|
keysForJwk = append(keysForJwk, string(k))
|
|
}
|
|
sort.Slice(keysForJwk, func(i, j int) bool {
|
|
return keysForJwk[i] < keysForJwk[j]
|
|
})
|
|
for iNdEx := len(keysForJwk) - 1; iNdEx >= 0; iNdEx-- {
|
|
v := x.Jwk[string(keysForJwk[iNdEx])]
|
|
out, err := MaRsHaLmAp(keysForJwk[iNdEx], v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
} else {
|
|
for k := range x.Jwk {
|
|
v := x.Jwk[k]
|
|
out, err := MaRsHaLmAp(k, v)
|
|
if err != nil {
|
|
return out, err
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if len(x.Multibase) > 0 {
|
|
i -= len(x.Multibase)
|
|
copy(dAtA[i:], x.Multibase)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Multibase)))
|
|
i--
|
|
dAtA[i] = 0x32
|
|
}
|
|
if len(x.Hex) > 0 {
|
|
i -= len(x.Hex)
|
|
copy(dAtA[i:], x.Hex)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hex)))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if len(x.Raw) > 0 {
|
|
i -= len(x.Raw)
|
|
copy(dAtA[i:], x.Raw)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Raw)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if x.Encoding != 0 {
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoding))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if x.Algorithm != 0 {
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Algorithm))
|
|
i--
|
|
dAtA[i] = 0x10
|
|
}
|
|
if x.Role != 0 {
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Role))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*PubKey)
|
|
if x == nil {
|
|
return protoiface.UnmarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Flags: input.Flags,
|
|
}, nil
|
|
}
|
|
options := runtime.UnmarshalInputToOptions(input)
|
|
_ = options
|
|
dAtA := input.Buf
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
|
|
}
|
|
x.Role = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
x.Role |= KeyRole(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType)
|
|
}
|
|
x.Algorithm = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
x.Algorithm |= KeyAlgorithm(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType)
|
|
}
|
|
x.Encoding = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
x.Encoding |= KeyEncoding(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Raw = append(x.Raw[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Raw == nil {
|
|
x.Raw = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hex", 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.Hex = 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 Multibase", 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.Multibase = 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 Jwk", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if x.Jwk == nil {
|
|
x.Jwk = 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.Jwk[mapkey] = mapvalue
|
|
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_Service protoreflect.MessageDescriptor
|
|
fd_Service_id protoreflect.FieldDescriptor
|
|
fd_Service_controller protoreflect.FieldDescriptor
|
|
fd_Service_origin protoreflect.FieldDescriptor
|
|
fd_Service_permissions protoreflect.FieldDescriptor
|
|
fd_Service_openid protoreflect.FieldDescriptor
|
|
fd_Service_metadata protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Service = File_did_v1_models_proto.Messages().ByName("Service")
|
|
fd_Service_id = md_Service.Fields().ByName("id")
|
|
fd_Service_controller = md_Service.Fields().ByName("controller")
|
|
fd_Service_origin = md_Service.Fields().ByName("origin")
|
|
fd_Service_permissions = md_Service.Fields().ByName("permissions")
|
|
fd_Service_openid = md_Service.Fields().ByName("openid")
|
|
fd_Service_metadata = md_Service.Fields().ByName("metadata")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Service)(nil)
|
|
|
|
type fastReflection_Service Service
|
|
|
|
func (x *Service) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Service)(x)
|
|
}
|
|
|
|
func (x *Service) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[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_Service_messageType fastReflection_Service_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Service_messageType{}
|
|
|
|
type fastReflection_Service_messageType struct{}
|
|
|
|
func (x fastReflection_Service_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Service)(nil)
|
|
}
|
|
func (x fastReflection_Service_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Service)
|
|
}
|
|
func (x fastReflection_Service_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Service
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Service) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Service
|
|
}
|
|
|
|
// Type returns the message type, which encapsulates both Go and protobuf
|
|
// type information. If the Go type information is not needed,
|
|
// it is recommended that the message descriptor be used instead.
|
|
func (x *fastReflection_Service) Type() protoreflect.MessageType {
|
|
return _fastReflection_Service_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Service) New() protoreflect.Message {
|
|
return new(fastReflection_Service)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage {
|
|
return (*Service)(x)
|
|
}
|
|
|
|
// Range iterates over every populated field in an undefined order,
|
|
// calling f for each field descriptor and value encountered.
|
|
// Range returns immediately if f returns false.
|
|
// While iterating, mutating operations may only be performed
|
|
// on the current field descriptor.
|
|
func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_Service_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Controller != "" {
|
|
value := protoreflect.ValueOfString(x.Controller)
|
|
if !f(fd_Service_controller, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Origin != "" {
|
|
value := protoreflect.ValueOfString(x.Origin)
|
|
if !f(fd_Service_origin, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Permissions != nil {
|
|
value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect())
|
|
if !f(fd_Service_permissions, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Openid != nil {
|
|
value := protoreflect.ValueOfMessage(x.Openid.ProtoReflect())
|
|
if !f(fd_Service_openid, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Metadata != nil {
|
|
value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect())
|
|
if !f(fd_Service_metadata, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Service.id":
|
|
return x.Id != ""
|
|
case "did.v1.Service.controller":
|
|
return x.Controller != ""
|
|
case "did.v1.Service.origin":
|
|
return x.Origin != ""
|
|
case "did.v1.Service.permissions":
|
|
return x.Permissions != nil
|
|
case "did.v1.Service.openid":
|
|
return x.Openid != nil
|
|
case "did.v1.Service.metadata":
|
|
return x.Metadata != nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Clear clears the field such that a subsequent Has call reports false.
|
|
//
|
|
// Clearing an extension field clears both the extension type and value
|
|
// associated with the given field number.
|
|
//
|
|
// Clear is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Service.id":
|
|
x.Id = ""
|
|
case "did.v1.Service.controller":
|
|
x.Controller = ""
|
|
case "did.v1.Service.origin":
|
|
x.Origin = ""
|
|
case "did.v1.Service.permissions":
|
|
x.Permissions = nil
|
|
case "did.v1.Service.openid":
|
|
x.Openid = nil
|
|
case "did.v1.Service.metadata":
|
|
x.Metadata = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Get retrieves the value for a field.
|
|
//
|
|
// For unpopulated scalars, it returns the default value, where
|
|
// the default value of a bytes scalar is guaranteed to be a copy.
|
|
// For unpopulated composite types, it returns an empty, read-only view
|
|
// of the value; to obtain a mutable reference, use Mutable.
|
|
func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Service.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Service.controller":
|
|
value := x.Controller
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Service.origin":
|
|
value := x.Origin
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Service.permissions":
|
|
value := x.Permissions
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
case "did.v1.Service.openid":
|
|
value := x.Openid
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
case "did.v1.Service.metadata":
|
|
value := x.Metadata
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", descriptor.FullName()))
|
|
}
|
|
}
|
|
|
|
// Set stores the value for a field.
|
|
//
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType.
|
|
// When setting a composite type, it is unspecified whether the stored value
|
|
// aliases the source's memory in any way. If the composite value is an
|
|
// empty, read-only value, then it panics.
|
|
//
|
|
// Set is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Service.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.Service.controller":
|
|
x.Controller = value.Interface().(string)
|
|
case "did.v1.Service.origin":
|
|
x.Origin = value.Interface().(string)
|
|
case "did.v1.Service.permissions":
|
|
x.Permissions = value.Message().Interface().(*Permissions)
|
|
case "did.v1.Service.openid":
|
|
x.Openid = value.Message().Interface().(*OpenIDConfig)
|
|
case "did.v1.Service.metadata":
|
|
x.Metadata = value.Message().Interface().(*Metadata)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// Mutable returns a mutable reference to a composite type.
|
|
//
|
|
// If the field is unpopulated, it may allocate a composite value.
|
|
// For a field belonging to a oneof, it implicitly clears any other field
|
|
// that may be currently set within the same oneof.
|
|
// For extension fields, it implicitly stores the provided ExtensionType
|
|
// if not already stored.
|
|
// It panics if the field does not contain a composite type.
|
|
//
|
|
// Mutable is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Service.permissions":
|
|
if x.Permissions == nil {
|
|
x.Permissions = new(Permissions)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect())
|
|
case "did.v1.Service.openid":
|
|
if x.Openid == nil {
|
|
x.Openid = new(OpenIDConfig)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.Openid.ProtoReflect())
|
|
case "did.v1.Service.metadata":
|
|
if x.Metadata == nil {
|
|
x.Metadata = new(Metadata)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect())
|
|
case "did.v1.Service.id":
|
|
panic(fmt.Errorf("field id of message did.v1.Service is not mutable"))
|
|
case "did.v1.Service.controller":
|
|
panic(fmt.Errorf("field controller 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"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// NewField returns a new value that is assignable to the field
|
|
// for the given descriptor. For scalars, this returns the default value.
|
|
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
|
func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Service.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Service.controller":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Service.origin":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Service.permissions":
|
|
m := new(Permissions)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
case "did.v1.Service.openid":
|
|
m := new(OpenIDConfig)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
case "did.v1.Service.metadata":
|
|
m := new(Metadata)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName()))
|
|
}
|
|
}
|
|
|
|
// WhichOneof reports which field within the oneof is populated,
|
|
// returning nil if none are populated.
|
|
// It panics if the oneof descriptor does not belong to this message.
|
|
func (x *fastReflection_Service) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Service", d.FullName()))
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
// GetUnknown retrieves the entire list of unknown fields.
|
|
// The caller may only mutate the contents of the RawFields
|
|
// if the mutated bytes are stored back into the message with SetUnknown.
|
|
func (x *fastReflection_Service) GetUnknown() protoreflect.RawFields {
|
|
return x.unknownFields
|
|
}
|
|
|
|
// SetUnknown stores an entire list of unknown fields.
|
|
// The raw fields must be syntactically valid according to the wire format.
|
|
// An implementation may panic if this is not the case.
|
|
// Once stored, the caller must not mutate the content of the RawFields.
|
|
// An empty RawFields may be passed to clear the fields.
|
|
//
|
|
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
|
func (x *fastReflection_Service) SetUnknown(fields protoreflect.RawFields) {
|
|
x.unknownFields = fields
|
|
}
|
|
|
|
// IsValid reports whether the message is valid.
|
|
//
|
|
// An invalid message is an empty, read-only value.
|
|
//
|
|
// An invalid message often corresponds to a nil pointer of the concrete
|
|
// message type, but the details are implementation dependent.
|
|
// Validity is not part of the protobuf data model, and may not
|
|
// be preserved in marshaling or other operations.
|
|
func (x *fastReflection_Service) IsValid() bool {
|
|
return x != nil
|
|
}
|
|
|
|
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
|
// This method may return nil.
|
|
//
|
|
// The returned methods type is identical to
|
|
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
|
// Consult the protoiface package documentation for details.
|
|
func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Service)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Controller)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Origin)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Permissions != nil {
|
|
l = options.Size(x.Permissions)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Openid != nil {
|
|
l = options.Size(x.Openid)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Metadata != nil {
|
|
l = options.Size(x.Metadata)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*Service)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if x.Metadata != nil {
|
|
encoded, err := options.Marshal(x.Metadata)
|
|
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] = 0x32
|
|
}
|
|
if x.Openid != nil {
|
|
encoded, err := options.Marshal(x.Openid)
|
|
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] = 0x2a
|
|
}
|
|
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] = 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.Controller) > 0 {
|
|
i -= len(x.Controller)
|
|
copy(dAtA[i:], x.Controller)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Service)
|
|
if x == nil {
|
|
return protoiface.UnmarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Flags: input.Flags,
|
|
}, nil
|
|
}
|
|
options := runtime.UnmarshalInputToOptions(input)
|
|
_ = options
|
|
dAtA := input.Buf
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Controller = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Origin = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if x.Permissions == nil {
|
|
x.Permissions = &Permissions{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Permissions); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
case 5:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Openid", 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.Openid == nil {
|
|
x.Openid = &OpenIDConfig{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Openid); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
case 6:
|
|
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 = &Metadata{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var (
|
|
md_Token protoreflect.MessageDescriptor
|
|
fd_Token_id protoreflect.FieldDescriptor
|
|
fd_Token_controller protoreflect.FieldDescriptor
|
|
fd_Token_macron protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Token = File_did_v1_models_proto.Messages().ByName("Token")
|
|
fd_Token_id = md_Token.Fields().ByName("id")
|
|
fd_Token_controller = md_Token.Fields().ByName("controller")
|
|
fd_Token_macron = md_Token.Fields().ByName("macron")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Token)(nil)
|
|
|
|
type fastReflection_Token Token
|
|
|
|
func (x *Token) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Token)(x)
|
|
}
|
|
|
|
func (x *Token) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[10]
|
|
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_Token_messageType fastReflection_Token_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Token_messageType{}
|
|
|
|
type fastReflection_Token_messageType struct{}
|
|
|
|
func (x fastReflection_Token_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Token)(nil)
|
|
}
|
|
func (x fastReflection_Token_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Token)
|
|
}
|
|
func (x fastReflection_Token_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Token
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Token) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Token
|
|
}
|
|
|
|
// 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_Token) Type() protoreflect.MessageType {
|
|
return _fastReflection_Token_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Token) New() protoreflect.Message {
|
|
return new(fastReflection_Token)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Token) Interface() protoreflect.ProtoMessage {
|
|
return (*Token)(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_Token) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_Token_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Controller != "" {
|
|
value := protoreflect.ValueOfString(x.Controller)
|
|
if !f(fd_Token_controller, value) {
|
|
return
|
|
}
|
|
}
|
|
if len(x.Macron) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Macron)
|
|
if !f(fd_Token_macron, 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_Token) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Token.id":
|
|
return x.Id != ""
|
|
case "did.v1.Token.controller":
|
|
return x.Controller != ""
|
|
case "did.v1.Token.macron":
|
|
return len(x.Macron) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Token.id":
|
|
x.Id = ""
|
|
case "did.v1.Token.controller":
|
|
x.Controller = ""
|
|
case "did.v1.Token.macron":
|
|
x.Macron = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Token.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Token.controller":
|
|
value := x.Controller
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.Token.macron":
|
|
value := x.Macron
|
|
return protoreflect.ValueOfBytes(value)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Token.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.Token.controller":
|
|
x.Controller = value.Interface().(string)
|
|
case "did.v1.Token.macron":
|
|
x.Macron = value.Bytes()
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Token.id":
|
|
panic(fmt.Errorf("field id of message did.v1.Token is not mutable"))
|
|
case "did.v1.Token.controller":
|
|
panic(fmt.Errorf("field controller of message did.v1.Token is not mutable"))
|
|
case "did.v1.Token.macron":
|
|
panic(fmt.Errorf("field macron of message did.v1.Token is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Token.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Token.controller":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.Token.macron":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Token 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_Token) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Token", 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_Token) 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_Token) 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_Token) 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_Token) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Token)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Controller)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Macron)
|
|
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().(*Token)
|
|
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.Macron) > 0 {
|
|
i -= len(x.Macron)
|
|
copy(dAtA[i:], x.Macron)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macron)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(x.Controller) > 0 {
|
|
i -= len(x.Controller)
|
|
copy(dAtA[i:], x.Controller)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*Token)
|
|
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: Token: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Controller = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Macron = append(x.Macron[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Macron == nil {
|
|
x.Macron = []byte{}
|
|
}
|
|
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_VerificationMethod protoreflect.MessageDescriptor
|
|
fd_VerificationMethod_id protoreflect.FieldDescriptor
|
|
fd_VerificationMethod_controller protoreflect.FieldDescriptor
|
|
fd_VerificationMethod_method protoreflect.FieldDescriptor
|
|
fd_VerificationMethod_public_key protoreflect.FieldDescriptor
|
|
fd_VerificationMethod_service protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_VerificationMethod = File_did_v1_models_proto.Messages().ByName("VerificationMethod")
|
|
fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id")
|
|
fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller")
|
|
fd_VerificationMethod_method = md_VerificationMethod.Fields().ByName("method")
|
|
fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key")
|
|
fd_VerificationMethod_service = md_VerificationMethod.Fields().ByName("service")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil)
|
|
|
|
type fastReflection_VerificationMethod VerificationMethod
|
|
|
|
func (x *VerificationMethod) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_VerificationMethod)(x)
|
|
}
|
|
|
|
func (x *VerificationMethod) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[11]
|
|
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_VerificationMethod_messageType fastReflection_VerificationMethod_messageType
|
|
var _ protoreflect.MessageType = fastReflection_VerificationMethod_messageType{}
|
|
|
|
type fastReflection_VerificationMethod_messageType struct{}
|
|
|
|
func (x fastReflection_VerificationMethod_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_VerificationMethod)(nil)
|
|
}
|
|
func (x fastReflection_VerificationMethod_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_VerificationMethod)
|
|
}
|
|
func (x fastReflection_VerificationMethod_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_VerificationMethod
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_VerificationMethod) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_VerificationMethod
|
|
}
|
|
|
|
// 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_VerificationMethod) Type() protoreflect.MessageType {
|
|
return _fastReflection_VerificationMethod_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_VerificationMethod) New() protoreflect.Message {
|
|
return new(fastReflection_VerificationMethod)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_VerificationMethod) Interface() protoreflect.ProtoMessage {
|
|
return (*VerificationMethod)(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_VerificationMethod) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if x.Id != "" {
|
|
value := protoreflect.ValueOfString(x.Id)
|
|
if !f(fd_VerificationMethod_id, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Controller != "" {
|
|
value := protoreflect.ValueOfString(x.Controller)
|
|
if !f(fd_VerificationMethod_controller, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Method != 0 {
|
|
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method))
|
|
if !f(fd_VerificationMethod_method, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.PublicKey != nil {
|
|
value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect())
|
|
if !f(fd_VerificationMethod_public_key, value) {
|
|
return
|
|
}
|
|
}
|
|
if x.Service != nil {
|
|
value := protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
|
if !f(fd_VerificationMethod_service, value) {
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
// Has reports whether a field is populated.
|
|
//
|
|
// Some fields have the property of nullability where it is possible to
|
|
// distinguish between the default value of a field and whether the field
|
|
// was explicitly populated with the default value. Singular message fields,
|
|
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
|
// fields are populated only if explicitly set.
|
|
//
|
|
// In other cases (aside from the nullable cases above),
|
|
// a proto3 scalar field is populated if it contains a non-zero value, and
|
|
// a repeated field is populated if it is non-empty.
|
|
func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.VerificationMethod.id":
|
|
return x.Id != ""
|
|
case "did.v1.VerificationMethod.controller":
|
|
return x.Controller != ""
|
|
case "did.v1.VerificationMethod.method":
|
|
return x.Method != 0
|
|
case "did.v1.VerificationMethod.public_key":
|
|
return x.PublicKey != nil
|
|
case "did.v1.VerificationMethod.service":
|
|
return x.Service != nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.VerificationMethod.id":
|
|
x.Id = ""
|
|
case "did.v1.VerificationMethod.controller":
|
|
x.Controller = ""
|
|
case "did.v1.VerificationMethod.method":
|
|
x.Method = 0
|
|
case "did.v1.VerificationMethod.public_key":
|
|
x.PublicKey = nil
|
|
case "did.v1.VerificationMethod.service":
|
|
x.Service = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.VerificationMethod.id":
|
|
value := x.Id
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.VerificationMethod.controller":
|
|
value := x.Controller
|
|
return protoreflect.ValueOfString(value)
|
|
case "did.v1.VerificationMethod.method":
|
|
value := x.Method
|
|
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
|
|
case "did.v1.VerificationMethod.public_key":
|
|
value := x.PublicKey
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
case "did.v1.VerificationMethod.service":
|
|
value := x.Service
|
|
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.VerificationMethod.id":
|
|
x.Id = value.Interface().(string)
|
|
case "did.v1.VerificationMethod.controller":
|
|
x.Controller = value.Interface().(string)
|
|
case "did.v1.VerificationMethod.method":
|
|
x.Method = (DIDNamespace)(value.Enum())
|
|
case "did.v1.VerificationMethod.public_key":
|
|
x.PublicKey = value.Message().Interface().(*PubKey)
|
|
case "did.v1.VerificationMethod.service":
|
|
x.Service = value.Message().Interface().(*Service)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.VerificationMethod.public_key":
|
|
if x.PublicKey == nil {
|
|
x.PublicKey = new(PubKey)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect())
|
|
case "did.v1.VerificationMethod.service":
|
|
if x.Service == nil {
|
|
x.Service = new(Service)
|
|
}
|
|
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
|
case "did.v1.VerificationMethod.id":
|
|
panic(fmt.Errorf("field id of message did.v1.VerificationMethod is not mutable"))
|
|
case "did.v1.VerificationMethod.controller":
|
|
panic(fmt.Errorf("field controller of message did.v1.VerificationMethod is not mutable"))
|
|
case "did.v1.VerificationMethod.method":
|
|
panic(fmt.Errorf("field method of message did.v1.VerificationMethod is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.VerificationMethod.id":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.VerificationMethod.controller":
|
|
return protoreflect.ValueOfString("")
|
|
case "did.v1.VerificationMethod.method":
|
|
return protoreflect.ValueOfEnum(0)
|
|
case "did.v1.VerificationMethod.public_key":
|
|
m := new(PubKey)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
case "did.v1.VerificationMethod.service":
|
|
m := new(Service)
|
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.VerificationMethod 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_VerificationMethod) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.VerificationMethod", 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) 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_VerificationMethod) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*VerificationMethod)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Id)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
l = len(x.Controller)
|
|
if l > 0 {
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Method != 0 {
|
|
n += 1 + runtime.Sov(uint64(x.Method))
|
|
}
|
|
if x.PublicKey != nil {
|
|
l = options.Size(x.PublicKey)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.Service != nil {
|
|
l = options.Size(x.Service)
|
|
n += 1 + l + runtime.Sov(uint64(l))
|
|
}
|
|
if x.unknownFields != nil {
|
|
n += len(x.unknownFields)
|
|
}
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: n,
|
|
}
|
|
}
|
|
|
|
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
|
x := input.Message.Interface().(*VerificationMethod)
|
|
if x == nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
options := runtime.MarshalInputToOptions(input)
|
|
_ = options
|
|
size := options.Size(x)
|
|
dAtA := make([]byte, size)
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if x.unknownFields != nil {
|
|
i -= len(x.unknownFields)
|
|
copy(dAtA[i:], x.unknownFields)
|
|
}
|
|
if x.Service != nil {
|
|
encoded, err := options.Marshal(x.Service)
|
|
if err != nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, err
|
|
}
|
|
i -= len(encoded)
|
|
copy(dAtA[i:], encoded)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
if x.PublicKey != nil {
|
|
encoded, err := options.Marshal(x.PublicKey)
|
|
if err != nil {
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, err
|
|
}
|
|
i -= len(encoded)
|
|
copy(dAtA[i:], encoded)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
|
i--
|
|
dAtA[i] = 0x22
|
|
}
|
|
if x.Method != 0 {
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(x.Method))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(x.Controller) > 0 {
|
|
i -= len(x.Controller)
|
|
copy(dAtA[i:], x.Controller)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if len(x.Id) > 0 {
|
|
i -= len(x.Id)
|
|
copy(dAtA[i:], x.Id)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id)))
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
if input.Buf != nil {
|
|
input.Buf = append(input.Buf, dAtA...)
|
|
} else {
|
|
input.Buf = dAtA
|
|
}
|
|
return protoiface.MarshalOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Buf: input.Buf,
|
|
}, nil
|
|
}
|
|
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
|
x := input.Message.Interface().(*VerificationMethod)
|
|
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: VerificationMethod: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Id = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Controller = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType)
|
|
}
|
|
x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 4:
|
|
if wireType != 2 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType)
|
|
}
|
|
var 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.PublicKey == nil {
|
|
x.PublicKey = &PubKey{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
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 msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if x.Service == nil {
|
|
x.Service = &Service{}
|
|
}
|
|
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
var (
|
|
md_Witness protoreflect.MessageDescriptor
|
|
fd_Witness_witness protoreflect.FieldDescriptor
|
|
)
|
|
|
|
func init() {
|
|
file_did_v1_models_proto_init()
|
|
md_Witness = File_did_v1_models_proto.Messages().ByName("Witness")
|
|
fd_Witness_witness = md_Witness.Fields().ByName("witness")
|
|
}
|
|
|
|
var _ protoreflect.Message = (*fastReflection_Witness)(nil)
|
|
|
|
type fastReflection_Witness Witness
|
|
|
|
func (x *Witness) ProtoReflect() protoreflect.Message {
|
|
return (*fastReflection_Witness)(x)
|
|
}
|
|
|
|
func (x *Witness) slowProtoReflect() protoreflect.Message {
|
|
mi := &file_did_v1_models_proto_msgTypes[12]
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
var _fastReflection_Witness_messageType fastReflection_Witness_messageType
|
|
var _ protoreflect.MessageType = fastReflection_Witness_messageType{}
|
|
|
|
type fastReflection_Witness_messageType struct{}
|
|
|
|
func (x fastReflection_Witness_messageType) Zero() protoreflect.Message {
|
|
return (*fastReflection_Witness)(nil)
|
|
}
|
|
func (x fastReflection_Witness_messageType) New() protoreflect.Message {
|
|
return new(fastReflection_Witness)
|
|
}
|
|
func (x fastReflection_Witness_messageType) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Witness
|
|
}
|
|
|
|
// Descriptor returns message descriptor, which contains only the protobuf
|
|
// type information for the message.
|
|
func (x *fastReflection_Witness) Descriptor() protoreflect.MessageDescriptor {
|
|
return md_Witness
|
|
}
|
|
|
|
// 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_Witness) Type() protoreflect.MessageType {
|
|
return _fastReflection_Witness_messageType
|
|
}
|
|
|
|
// New returns a newly allocated and mutable empty message.
|
|
func (x *fastReflection_Witness) New() protoreflect.Message {
|
|
return new(fastReflection_Witness)
|
|
}
|
|
|
|
// Interface unwraps the message reflection interface and
|
|
// returns the underlying ProtoMessage interface.
|
|
func (x *fastReflection_Witness) Interface() protoreflect.ProtoMessage {
|
|
return (*Witness)(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_Witness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
|
if len(x.Witness) != 0 {
|
|
value := protoreflect.ValueOfBytes(x.Witness)
|
|
if !f(fd_Witness_witness, 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_Witness) Has(fd protoreflect.FieldDescriptor) bool {
|
|
switch fd.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
return len(x.Witness) != 0
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) Clear(fd protoreflect.FieldDescriptor) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
x.Witness = nil
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch descriptor.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
value := x.Witness
|
|
return protoreflect.ValueOfBytes(value)
|
|
default:
|
|
if descriptor.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
|
switch fd.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
x.Witness = value.Bytes()
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
panic(fmt.Errorf("field witness of message did.v1.Witness is not mutable"))
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
|
switch fd.FullName() {
|
|
case "did.v1.Witness.witness":
|
|
return protoreflect.ValueOfBytes(nil)
|
|
default:
|
|
if fd.IsExtension() {
|
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness"))
|
|
}
|
|
panic(fmt.Errorf("message did.v1.Witness 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_Witness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
|
switch d.FullName() {
|
|
default:
|
|
panic(fmt.Errorf("%s is not a oneof field in did.v1.Witness", 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_Witness) 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_Witness) 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_Witness) 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_Witness) ProtoMethods() *protoiface.Methods {
|
|
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
|
x := input.Message.Interface().(*Witness)
|
|
if x == nil {
|
|
return protoiface.SizeOutput{
|
|
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
|
Size: 0,
|
|
}
|
|
}
|
|
options := runtime.SizeInputToOptions(input)
|
|
_ = options
|
|
var n int
|
|
var l int
|
|
_ = l
|
|
l = len(x.Witness)
|
|
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().(*Witness)
|
|
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.Witness) > 0 {
|
|
i -= len(x.Witness)
|
|
copy(dAtA[i:], x.Witness)
|
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness)))
|
|
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().(*Witness)
|
|
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: Witness: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Witness: 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 Witness", wireType)
|
|
}
|
|
var byteLen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
|
}
|
|
if iNdEx >= l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
byteLen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if byteLen < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
postIndex := iNdEx + byteLen
|
|
if postIndex < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if postIndex > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...)
|
|
if x.Witness == nil {
|
|
x.Witness = []byte{}
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
|
}
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
if !options.DiscardUnknown {
|
|
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
|
}
|
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
|
}
|
|
return &protoiface.Methods{
|
|
NoUnkeyedLiterals: struct{}{},
|
|
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
|
Size: size,
|
|
Marshal: marshal,
|
|
Unmarshal: unmarshal,
|
|
Merge: nil,
|
|
CheckInitialized: nil,
|
|
}
|
|
}
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.27.0
|
|
// protoc (unknown)
|
|
// source: did/v1/models.proto
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// Accumulator defines a BLS accumulator
|
|
type Accumulator struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"`
|
|
}
|
|
|
|
func (x *Accumulator) Reset() {
|
|
*x = Accumulator{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Accumulator) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Accumulator) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Accumulator.ProtoReflect.Descriptor instead.
|
|
func (*Accumulator) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *Accumulator) GetAccumulator() []byte {
|
|
if x != nil {
|
|
return x.Accumulator
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Credential defines a WebAuthn credential
|
|
type Credential struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"`
|
|
CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
|
|
Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"`
|
|
Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"`
|
|
Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"`
|
|
}
|
|
|
|
func (x *Credential) Reset() {
|
|
*x = Credential{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Credential) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Credential) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Credential.ProtoReflect.Descriptor instead.
|
|
func (*Credential) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *Credential) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Credential) GetCredentialType() string {
|
|
if x != nil {
|
|
return x.CredentialType
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Credential) GetCredentialId() []byte {
|
|
if x != nil {
|
|
return x.CredentialId
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Credential) GetTransport() []string {
|
|
if x != nil {
|
|
return x.Transport
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Credential) GetSubject() string {
|
|
if x != nil {
|
|
return x.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Credential) GetController() string {
|
|
if x != nil {
|
|
return x.Controller
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// DID defines a parsed DID string
|
|
type DID struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"`
|
|
Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
|
|
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
|
|
Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"`
|
|
Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"`
|
|
}
|
|
|
|
func (x *DID) Reset() {
|
|
*x = DID{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *DID) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*DID) ProtoMessage() {}
|
|
|
|
// Deprecated: Use DID.ProtoReflect.Descriptor instead.
|
|
func (*DID) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *DID) GetMethod() DIDNamespace {
|
|
if x != nil {
|
|
return x.Method
|
|
}
|
|
return DIDNamespace_DID_NAMESPACE_UNSPECIFIED
|
|
}
|
|
|
|
func (x *DID) GetNetwork() string {
|
|
if x != nil {
|
|
return x.Network
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DID) GetSubject() string {
|
|
if x != nil {
|
|
return x.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DID) GetIdentifier() string {
|
|
if x != nil {
|
|
return x.Identifier
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *DID) GetPaths() []string {
|
|
if x != nil {
|
|
return x.Paths
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Document defines a DID document
|
|
type Document struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"`
|
|
Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"`
|
|
AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"`
|
|
CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"`
|
|
CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"`
|
|
Service []string `protobuf:"bytes,9,rep,name=service,proto3" json:"service,omitempty"`
|
|
}
|
|
|
|
func (x *Document) Reset() {
|
|
*x = Document{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Document) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Document) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Document.ProtoReflect.Descriptor instead.
|
|
func (*Document) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *Document) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Document) GetVerificationMethods() []*VerificationMethod {
|
|
if x != nil {
|
|
return x.VerificationMethods
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Document) GetAuthentication() []string {
|
|
if x != nil {
|
|
return x.Authentication
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Document) GetAssertionMethod() []string {
|
|
if x != nil {
|
|
return x.AssertionMethod
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Document) GetCapabilityDelegation() []string {
|
|
if x != nil {
|
|
return x.CapabilityDelegation
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Document) GetCapabilityInvocation() []string {
|
|
if x != nil {
|
|
return x.CapabilityInvocation
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Document) GetService() []string {
|
|
if x != nil {
|
|
return x.Service
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Metadata defines additional information provided to a did
|
|
type Metadata struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"`
|
|
Public map[string]string `protobuf:"bytes,2,rep,name=public,proto3" json:"public,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
Private map[string]*Property `protobuf:"bytes,3,rep,name=private,proto3" json:"private,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
}
|
|
|
|
func (x *Metadata) Reset() {
|
|
*x = Metadata{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Metadata) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Metadata) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Metadata.ProtoReflect.Descriptor instead.
|
|
func (*Metadata) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *Metadata) GetOriginUri() string {
|
|
if x != nil {
|
|
return x.OriginUri
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Metadata) GetPublic() map[string]string {
|
|
if x != nil {
|
|
return x.Public
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Metadata) GetPrivate() map[string]*Property {
|
|
if x != nil {
|
|
return x.Private
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Permissions contains a list of grants and access control rules for
|
|
// a Service.
|
|
type Permissions struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Grants []DIDNamespace `protobuf:"varint,1,rep,packed,name=grants,proto3,enum=did.v1.DIDNamespace" json:"grants,omitempty"`
|
|
Scopes []PermissionScope `protobuf:"varint,2,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"`
|
|
}
|
|
|
|
func (x *Permissions) Reset() {
|
|
*x = Permissions{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Permissions) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Permissions) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Permissions.ProtoReflect.Descriptor instead.
|
|
func (*Permissions) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *Permissions) GetGrants() []DIDNamespace {
|
|
if x != nil {
|
|
return x.Grants
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Permissions) GetScopes() []PermissionScope {
|
|
if x != nil {
|
|
return x.Scopes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Profile defines an associated public identity for a did subject
|
|
type Profile struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
|
|
Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"`
|
|
Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
}
|
|
|
|
func (x *Profile) Reset() {
|
|
*x = Profile{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Profile) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Profile) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Profile.ProtoReflect.Descriptor instead.
|
|
func (*Profile) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *Profile) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Profile) GetSubject() string {
|
|
if x != nil {
|
|
return x.Subject
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Profile) GetController() string {
|
|
if x != nil {
|
|
return x.Controller
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Profile) GetMetadata() *Metadata {
|
|
if x != nil {
|
|
return x.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Property defines a Zero-Knowledge accumulator which can be used to
|
|
// anonymously prove a given value to a DID subject
|
|
type Property struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"`
|
|
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
|
|
}
|
|
|
|
func (x *Property) Reset() {
|
|
*x = Property{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Property) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Property) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Property.ProtoReflect.Descriptor instead.
|
|
func (*Property) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *Property) GetAccumulator() []byte {
|
|
if x != nil {
|
|
return x.Accumulator
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Property) GetKey() []byte {
|
|
if x != nil {
|
|
return x.Key
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// PubKey defines a public key for a did
|
|
type PubKey struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"`
|
|
Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"`
|
|
Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"`
|
|
Raw []byte `protobuf:"bytes,4,opt,name=raw,proto3" json:"raw,omitempty"`
|
|
Hex string `protobuf:"bytes,5,opt,name=hex,proto3" json:"hex,omitempty"`
|
|
Multibase string `protobuf:"bytes,6,opt,name=multibase,proto3" json:"multibase,omitempty"`
|
|
Jwk map[string]string `protobuf:"bytes,7,rep,name=jwk,proto3" json:"jwk,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
}
|
|
|
|
func (x *PubKey) Reset() {
|
|
*x = PubKey{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *PubKey) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*PubKey) ProtoMessage() {}
|
|
|
|
// Deprecated: Use PubKey.ProtoReflect.Descriptor instead.
|
|
func (*PubKey) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *PubKey) GetRole() KeyRole {
|
|
if x != nil {
|
|
return x.Role
|
|
}
|
|
return KeyRole_KEY_ROLE_UNSPECIFIED
|
|
}
|
|
|
|
func (x *PubKey) GetAlgorithm() KeyAlgorithm {
|
|
if x != nil {
|
|
return x.Algorithm
|
|
}
|
|
return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED
|
|
}
|
|
|
|
func (x *PubKey) GetEncoding() KeyEncoding {
|
|
if x != nil {
|
|
return x.Encoding
|
|
}
|
|
return KeyEncoding_KEY_ENCODING_UNSPECIFIED
|
|
}
|
|
|
|
func (x *PubKey) GetRaw() []byte {
|
|
if x != nil {
|
|
return x.Raw
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *PubKey) GetHex() string {
|
|
if x != nil {
|
|
return x.Hex
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PubKey) GetMultibase() string {
|
|
if x != nil {
|
|
return x.Multibase
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *PubKey) GetJwk() map[string]string {
|
|
if x != nil {
|
|
return x.Jwk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Service defines a Decentralized Service on the Sonr Blockchain
|
|
type Service struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
|
Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"`
|
|
Permissions *Permissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
|
Openid *OpenIDConfig `protobuf:"bytes,5,opt,name=openid,proto3" json:"openid,omitempty"`
|
|
Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
}
|
|
|
|
func (x *Service) Reset() {
|
|
*x = Service{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Service) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Service) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Service.ProtoReflect.Descriptor instead.
|
|
func (*Service) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *Service) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Service) GetController() string {
|
|
if x != nil {
|
|
return x.Controller
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Service) GetOrigin() string {
|
|
if x != nil {
|
|
return x.Origin
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Service) GetPermissions() *Permissions {
|
|
if x != nil {
|
|
return x.Permissions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Service) GetOpenid() *OpenIDConfig {
|
|
if x != nil {
|
|
return x.Openid
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Service) GetMetadata() *Metadata {
|
|
if x != nil {
|
|
return x.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Token defines a macron token
|
|
type Token struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
|
Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"`
|
|
}
|
|
|
|
func (x *Token) Reset() {
|
|
*x = Token{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Token) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Token) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Token.ProtoReflect.Descriptor instead.
|
|
func (*Token) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *Token) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetController() string {
|
|
if x != nil {
|
|
return x.Controller
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Token) GetMacron() []byte {
|
|
if x != nil {
|
|
return x.Macron
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// VerificationMethod defines a verification method
|
|
type VerificationMethod struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
|
|
Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"`
|
|
PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
|
Service *Service `protobuf:"bytes,7,opt,name=service,proto3" json:"service,omitempty"`
|
|
}
|
|
|
|
func (x *VerificationMethod) Reset() {
|
|
*x = VerificationMethod{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *VerificationMethod) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*VerificationMethod) ProtoMessage() {}
|
|
|
|
// Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead.
|
|
func (*VerificationMethod) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *VerificationMethod) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *VerificationMethod) GetController() string {
|
|
if x != nil {
|
|
return x.Controller
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *VerificationMethod) GetMethod() DIDNamespace {
|
|
if x != nil {
|
|
return x.Method
|
|
}
|
|
return DIDNamespace_DID_NAMESPACE_UNSPECIFIED
|
|
}
|
|
|
|
func (x *VerificationMethod) GetPublicKey() *PubKey {
|
|
if x != nil {
|
|
return x.PublicKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *VerificationMethod) GetService() *Service {
|
|
if x != nil {
|
|
return x.Service
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// Witness defines a BLS witness
|
|
type Witness struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Witness []byte `protobuf:"bytes,1,opt,name=witness,proto3" json:"witness,omitempty"`
|
|
}
|
|
|
|
func (x *Witness) Reset() {
|
|
*x = Witness{}
|
|
if protoimpl.UnsafeEnabled {
|
|
mi := &file_did_v1_models_proto_msgTypes[12]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
}
|
|
|
|
func (x *Witness) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Witness) ProtoMessage() {}
|
|
|
|
// Deprecated: Use Witness.ProtoReflect.Descriptor instead.
|
|
func (*Witness) Descriptor() ([]byte, []int) {
|
|
return file_did_v1_models_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *Witness) GetWitness() []byte {
|
|
if x != nil {
|
|
return x.Witness
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_did_v1_models_proto protoreflect.FileDescriptor
|
|
|
|
var file_did_v1_models_proto_rawDesc = []byte{
|
|
0x0a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e,
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x64,
|
|
0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x2e,
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65,
|
|
0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67,
|
|
0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
|
0x6f, 0x22, 0x2f, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72,
|
|
0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18,
|
|
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74,
|
|
0x6f, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
|
|
0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
|
0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
|
|
0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64,
|
|
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72,
|
|
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12,
|
|
0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x03,
|
|
0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a,
|
|
0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
|
0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
|
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
|
|
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x12,
|
|
0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 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, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a,
|
|
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
|
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65,
|
|
0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
|
|
0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18,
|
|
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
|
|
0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09,
|
|
0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xc0, 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, 0x4d, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
|
|
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03,
|
|
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69,
|
|
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13,
|
|
0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68,
|
|
0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63,
|
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 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,
|
|
0x05, 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,
|
|
0x07, 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, 0x08, 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, 0x09, 0x20, 0x03, 0x28,
|
|
0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x4d,
|
|
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
|
0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69,
|
|
0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
|
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e,
|
|
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45,
|
|
0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x37, 0x0a, 0x07,
|
|
0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
|
|
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
|
|
0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72,
|
|
0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 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, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
|
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
|
0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
|
0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65,
|
|
0x72, 0x74, 0x79, 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, 0x01, 0x0a,
|
|
0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a,
|
|
0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65,
|
|
0x63, 0x74, 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, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
|
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65,
|
|
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
|
0x22, 0x3e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b,
|
|
0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x10,
|
|
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
|
0x22, 0xb7, 0x02, 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, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, 0x01,
|
|
0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x65, 0x78, 0x18, 0x05,
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c,
|
|
0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75,
|
|
0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07,
|
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75,
|
|
0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x77, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6a,
|
|
0x77, 0x6b, 0x1a, 0x36, 0x0a, 0x08, 0x4a, 0x77, 0x6b, 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, 0xe4, 0x01, 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, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
|
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x35,
|
|
0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 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, 0x12, 0x2c, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x18,
|
|
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f,
|
|
0x70, 0x65, 0x6e, 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x6f, 0x70, 0x65,
|
|
0x6e, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18,
|
|
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
|
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
|
0x61, 0x22, 0x4f, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x16, 0x0a, 0x06, 0x6d, 0x61,
|
|
0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72,
|
|
0x6f, 0x6e, 0x22, 0xcc, 0x01, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
|
|
0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74,
|
|
0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 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, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
|
0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69,
|
|
0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62,
|
|
0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
|
|
0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
0x65, 0x22, 0x23, 0x0a, 0x07, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07,
|
|
0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77,
|
|
0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x42, 0x7b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69,
|
|
0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74,
|
|
0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
|
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
|
0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44,
|
|
0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69,
|
|
0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
|
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a,
|
|
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
}
|
|
|
|
var (
|
|
file_did_v1_models_proto_rawDescOnce sync.Once
|
|
file_did_v1_models_proto_rawDescData = file_did_v1_models_proto_rawDesc
|
|
)
|
|
|
|
func file_did_v1_models_proto_rawDescGZIP() []byte {
|
|
file_did_v1_models_proto_rawDescOnce.Do(func() {
|
|
file_did_v1_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_models_proto_rawDescData)
|
|
})
|
|
return file_did_v1_models_proto_rawDescData
|
|
}
|
|
|
|
var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
|
var file_did_v1_models_proto_goTypes = []interface{}{
|
|
(*Accumulator)(nil), // 0: did.v1.Accumulator
|
|
(*Credential)(nil), // 1: did.v1.Credential
|
|
(*DID)(nil), // 2: did.v1.DID
|
|
(*Document)(nil), // 3: did.v1.Document
|
|
(*Metadata)(nil), // 4: did.v1.Metadata
|
|
(*Permissions)(nil), // 5: did.v1.Permissions
|
|
(*Profile)(nil), // 6: did.v1.Profile
|
|
(*Property)(nil), // 7: did.v1.Property
|
|
(*PubKey)(nil), // 8: did.v1.PubKey
|
|
(*Service)(nil), // 9: did.v1.Service
|
|
(*Token)(nil), // 10: did.v1.Token
|
|
(*VerificationMethod)(nil), // 11: did.v1.VerificationMethod
|
|
(*Witness)(nil), // 12: did.v1.Witness
|
|
nil, // 13: did.v1.Metadata.PublicEntry
|
|
nil, // 14: did.v1.Metadata.PrivateEntry
|
|
nil, // 15: did.v1.PubKey.JwkEntry
|
|
(DIDNamespace)(0), // 16: did.v1.DIDNamespace
|
|
(PermissionScope)(0), // 17: did.v1.PermissionScope
|
|
(KeyRole)(0), // 18: did.v1.KeyRole
|
|
(KeyAlgorithm)(0), // 19: did.v1.KeyAlgorithm
|
|
(KeyEncoding)(0), // 20: did.v1.KeyEncoding
|
|
(*OpenIDConfig)(nil), // 21: did.v1.OpenIDConfig
|
|
}
|
|
var file_did_v1_models_proto_depIdxs = []int32{
|
|
16, // 0: did.v1.DID.method:type_name -> did.v1.DIDNamespace
|
|
11, // 1: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod
|
|
13, // 2: did.v1.Metadata.public:type_name -> did.v1.Metadata.PublicEntry
|
|
14, // 3: did.v1.Metadata.private:type_name -> did.v1.Metadata.PrivateEntry
|
|
16, // 4: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace
|
|
17, // 5: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope
|
|
4, // 6: did.v1.Profile.metadata:type_name -> did.v1.Metadata
|
|
18, // 7: did.v1.PubKey.role:type_name -> did.v1.KeyRole
|
|
19, // 8: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm
|
|
20, // 9: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding
|
|
15, // 10: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JwkEntry
|
|
5, // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions
|
|
21, // 12: did.v1.Service.openid:type_name -> did.v1.OpenIDConfig
|
|
4, // 13: did.v1.Service.metadata:type_name -> did.v1.Metadata
|
|
16, // 14: did.v1.VerificationMethod.method:type_name -> did.v1.DIDNamespace
|
|
8, // 15: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey
|
|
9, // 16: did.v1.VerificationMethod.service:type_name -> did.v1.Service
|
|
7, // 17: did.v1.Metadata.PrivateEntry.value:type_name -> did.v1.Property
|
|
18, // [18:18] is the sub-list for method output_type
|
|
18, // [18:18] is the sub-list for method input_type
|
|
18, // [18:18] is the sub-list for extension type_name
|
|
18, // [18:18] is the sub-list for extension extendee
|
|
0, // [0:18] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_did_v1_models_proto_init() }
|
|
func file_did_v1_models_proto_init() {
|
|
if File_did_v1_models_proto != nil {
|
|
return
|
|
}
|
|
file_did_v1_constants_proto_init()
|
|
file_did_v1_genesis_proto_init()
|
|
if !protoimpl.UnsafeEnabled {
|
|
file_did_v1_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Accumulator); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Credential); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*DID); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Document); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Metadata); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Permissions); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Profile); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Property); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*PubKey); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Service); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Token); 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[11].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*VerificationMethod); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
file_did_v1_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
|
switch v := v.(*Witness); i {
|
|
case 0:
|
|
return &v.state
|
|
case 1:
|
|
return &v.sizeCache
|
|
case 2:
|
|
return &v.unknownFields
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: file_did_v1_models_proto_rawDesc,
|
|
NumEnums: 0,
|
|
NumMessages: 16,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_did_v1_models_proto_goTypes,
|
|
DependencyIndexes: file_did_v1_models_proto_depIdxs,
|
|
MessageInfos: file_did_v1_models_proto_msgTypes,
|
|
}.Build()
|
|
File_did_v1_models_proto = out.File
|
|
file_did_v1_models_proto_rawDesc = nil
|
|
file_did_v1_models_proto_goTypes = nil
|
|
file_did_v1_models_proto_depIdxs = nil
|
|
}
|