Files
sonr/api/dwn/v1/events.pulsar.go
T

6141 lines
225 KiB
Go
Raw Normal View History

2025-10-03 14:45:52 -04:00
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package dwnv1
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"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
io "io"
reflect "reflect"
sync "sync"
2025-10-03 14:45:52 -04:00
)
var (
md_EventRecordWritten protoreflect.MessageDescriptor
fd_EventRecordWritten_record_id protoreflect.FieldDescriptor
fd_EventRecordWritten_target protoreflect.FieldDescriptor
fd_EventRecordWritten_protocol protoreflect.FieldDescriptor
fd_EventRecordWritten_schema protoreflect.FieldDescriptor
fd_EventRecordWritten_data_cid protoreflect.FieldDescriptor
fd_EventRecordWritten_data_size protoreflect.FieldDescriptor
fd_EventRecordWritten_encrypted protoreflect.FieldDescriptor
fd_EventRecordWritten_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventRecordWritten = File_dwn_v1_events_proto.Messages().ByName("EventRecordWritten")
fd_EventRecordWritten_record_id = md_EventRecordWritten.Fields().ByName("record_id")
fd_EventRecordWritten_target = md_EventRecordWritten.Fields().ByName("target")
fd_EventRecordWritten_protocol = md_EventRecordWritten.Fields().ByName("protocol")
fd_EventRecordWritten_schema = md_EventRecordWritten.Fields().ByName("schema")
fd_EventRecordWritten_data_cid = md_EventRecordWritten.Fields().ByName("data_cid")
fd_EventRecordWritten_data_size = md_EventRecordWritten.Fields().ByName("data_size")
fd_EventRecordWritten_encrypted = md_EventRecordWritten.Fields().ByName("encrypted")
fd_EventRecordWritten_block_height = md_EventRecordWritten.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventRecordWritten)(nil)
type fastReflection_EventRecordWritten EventRecordWritten
func (x *EventRecordWritten) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventRecordWritten)(x)
}
func (x *EventRecordWritten) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventRecordWritten_messageType fastReflection_EventRecordWritten_messageType
var _ protoreflect.MessageType = fastReflection_EventRecordWritten_messageType{}
type fastReflection_EventRecordWritten_messageType struct{}
func (x fastReflection_EventRecordWritten_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventRecordWritten)(nil)
}
func (x fastReflection_EventRecordWritten_messageType) New() protoreflect.Message {
return new(fastReflection_EventRecordWritten)
}
func (x fastReflection_EventRecordWritten_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventRecordWritten
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventRecordWritten) Descriptor() protoreflect.MessageDescriptor {
return md_EventRecordWritten
}
// 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_EventRecordWritten) Type() protoreflect.MessageType {
return _fastReflection_EventRecordWritten_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventRecordWritten) New() protoreflect.Message {
return new(fastReflection_EventRecordWritten)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventRecordWritten) Interface() protoreflect.ProtoMessage {
return (*EventRecordWritten)(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_EventRecordWritten) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.RecordId != "" {
value := protoreflect.ValueOfString(x.RecordId)
if !f(fd_EventRecordWritten_record_id, value) {
return
}
}
if x.Target != "" {
value := protoreflect.ValueOfString(x.Target)
if !f(fd_EventRecordWritten_target, value) {
return
}
}
if x.Protocol != "" {
value := protoreflect.ValueOfString(x.Protocol)
if !f(fd_EventRecordWritten_protocol, value) {
return
}
}
if x.Schema != "" {
value := protoreflect.ValueOfString(x.Schema)
if !f(fd_EventRecordWritten_schema, value) {
return
}
}
if x.DataCid != "" {
value := protoreflect.ValueOfString(x.DataCid)
if !f(fd_EventRecordWritten_data_cid, value) {
return
}
}
if x.DataSize != uint64(0) {
value := protoreflect.ValueOfUint64(x.DataSize)
if !f(fd_EventRecordWritten_data_size, value) {
return
}
}
if x.Encrypted != false {
value := protoreflect.ValueOfBool(x.Encrypted)
if !f(fd_EventRecordWritten_encrypted, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventRecordWritten_block_height, 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_EventRecordWritten) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
return x.RecordId != ""
case "dwn.v1.EventRecordWritten.target":
return x.Target != ""
case "dwn.v1.EventRecordWritten.protocol":
return x.Protocol != ""
case "dwn.v1.EventRecordWritten.schema":
return x.Schema != ""
case "dwn.v1.EventRecordWritten.data_cid":
return x.DataCid != ""
case "dwn.v1.EventRecordWritten.data_size":
return x.DataSize != uint64(0)
case "dwn.v1.EventRecordWritten.encrypted":
return x.Encrypted != false
case "dwn.v1.EventRecordWritten.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
x.RecordId = ""
case "dwn.v1.EventRecordWritten.target":
x.Target = ""
case "dwn.v1.EventRecordWritten.protocol":
x.Protocol = ""
case "dwn.v1.EventRecordWritten.schema":
x.Schema = ""
case "dwn.v1.EventRecordWritten.data_cid":
x.DataCid = ""
case "dwn.v1.EventRecordWritten.data_size":
x.DataSize = uint64(0)
case "dwn.v1.EventRecordWritten.encrypted":
x.Encrypted = false
case "dwn.v1.EventRecordWritten.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
value := x.RecordId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordWritten.target":
value := x.Target
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordWritten.protocol":
value := x.Protocol
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordWritten.schema":
value := x.Schema
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordWritten.data_cid":
value := x.DataCid
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordWritten.data_size":
value := x.DataSize
return protoreflect.ValueOfUint64(value)
case "dwn.v1.EventRecordWritten.encrypted":
value := x.Encrypted
return protoreflect.ValueOfBool(value)
case "dwn.v1.EventRecordWritten.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
x.RecordId = value.Interface().(string)
case "dwn.v1.EventRecordWritten.target":
x.Target = value.Interface().(string)
case "dwn.v1.EventRecordWritten.protocol":
x.Protocol = value.Interface().(string)
case "dwn.v1.EventRecordWritten.schema":
x.Schema = value.Interface().(string)
case "dwn.v1.EventRecordWritten.data_cid":
x.DataCid = value.Interface().(string)
case "dwn.v1.EventRecordWritten.data_size":
x.DataSize = value.Uint()
case "dwn.v1.EventRecordWritten.encrypted":
x.Encrypted = value.Bool()
case "dwn.v1.EventRecordWritten.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
panic(fmt.Errorf("field record_id of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.target":
panic(fmt.Errorf("field target of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.protocol":
panic(fmt.Errorf("field protocol of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.schema":
panic(fmt.Errorf("field schema of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.data_cid":
panic(fmt.Errorf("field data_cid of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.data_size":
panic(fmt.Errorf("field data_size of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.encrypted":
panic(fmt.Errorf("field encrypted of message dwn.v1.EventRecordWritten is not mutable"))
case "dwn.v1.EventRecordWritten.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventRecordWritten is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventRecordWritten.record_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordWritten.target":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordWritten.protocol":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordWritten.schema":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordWritten.data_cid":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordWritten.data_size":
return protoreflect.ValueOfUint64(uint64(0))
case "dwn.v1.EventRecordWritten.encrypted":
return protoreflect.ValueOfBool(false)
case "dwn.v1.EventRecordWritten.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordWritten"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordWritten 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_EventRecordWritten) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventRecordWritten", 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_EventRecordWritten) 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_EventRecordWritten) 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_EventRecordWritten) 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_EventRecordWritten) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventRecordWritten)
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.RecordId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Target)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Protocol)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Schema)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.DataCid)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.DataSize != 0 {
n += 1 + runtime.Sov(uint64(x.DataSize))
}
if x.Encrypted {
n += 2
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventRecordWritten)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x40
}
if x.Encrypted {
i--
if x.Encrypted {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x38
}
if x.DataSize != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.DataSize))
i--
dAtA[i] = 0x30
}
if len(x.DataCid) > 0 {
i -= len(x.DataCid)
copy(dAtA[i:], x.DataCid)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DataCid)))
i--
dAtA[i] = 0x2a
}
if len(x.Schema) > 0 {
i -= len(x.Schema)
copy(dAtA[i:], x.Schema)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Schema)))
i--
dAtA[i] = 0x22
}
if len(x.Protocol) > 0 {
i -= len(x.Protocol)
copy(dAtA[i:], x.Protocol)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Protocol)))
i--
dAtA[i] = 0x1a
}
if len(x.Target) > 0 {
i -= len(x.Target)
copy(dAtA[i:], x.Target)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Target)))
i--
dAtA[i] = 0x12
}
if len(x.RecordId) > 0 {
i -= len(x.RecordId)
copy(dAtA[i:], x.RecordId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecordId)))
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().(*EventRecordWritten)
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: EventRecordWritten: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRecordWritten: 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 RecordId", 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.RecordId = 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 Target", 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.Target = 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 Protocol", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Protocol = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", 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.Schema = 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 DataCid", 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.DataCid = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DataSize", wireType)
}
x.DataSize = 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.DataSize |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encrypted", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Encrypted = bool(v != 0)
case 8:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventRecordDeleted protoreflect.MessageDescriptor
fd_EventRecordDeleted_record_id protoreflect.FieldDescriptor
fd_EventRecordDeleted_target protoreflect.FieldDescriptor
fd_EventRecordDeleted_deleter protoreflect.FieldDescriptor
fd_EventRecordDeleted_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventRecordDeleted = File_dwn_v1_events_proto.Messages().ByName("EventRecordDeleted")
fd_EventRecordDeleted_record_id = md_EventRecordDeleted.Fields().ByName("record_id")
fd_EventRecordDeleted_target = md_EventRecordDeleted.Fields().ByName("target")
fd_EventRecordDeleted_deleter = md_EventRecordDeleted.Fields().ByName("deleter")
fd_EventRecordDeleted_block_height = md_EventRecordDeleted.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventRecordDeleted)(nil)
type fastReflection_EventRecordDeleted EventRecordDeleted
func (x *EventRecordDeleted) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventRecordDeleted)(x)
}
func (x *EventRecordDeleted) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventRecordDeleted_messageType fastReflection_EventRecordDeleted_messageType
var _ protoreflect.MessageType = fastReflection_EventRecordDeleted_messageType{}
type fastReflection_EventRecordDeleted_messageType struct{}
func (x fastReflection_EventRecordDeleted_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventRecordDeleted)(nil)
}
func (x fastReflection_EventRecordDeleted_messageType) New() protoreflect.Message {
return new(fastReflection_EventRecordDeleted)
}
func (x fastReflection_EventRecordDeleted_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventRecordDeleted
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventRecordDeleted) Descriptor() protoreflect.MessageDescriptor {
return md_EventRecordDeleted
}
// 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_EventRecordDeleted) Type() protoreflect.MessageType {
return _fastReflection_EventRecordDeleted_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventRecordDeleted) New() protoreflect.Message {
return new(fastReflection_EventRecordDeleted)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventRecordDeleted) Interface() protoreflect.ProtoMessage {
return (*EventRecordDeleted)(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_EventRecordDeleted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.RecordId != "" {
value := protoreflect.ValueOfString(x.RecordId)
if !f(fd_EventRecordDeleted_record_id, value) {
return
}
}
if x.Target != "" {
value := protoreflect.ValueOfString(x.Target)
if !f(fd_EventRecordDeleted_target, value) {
return
}
}
if x.Deleter != "" {
value := protoreflect.ValueOfString(x.Deleter)
if !f(fd_EventRecordDeleted_deleter, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventRecordDeleted_block_height, 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_EventRecordDeleted) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
return x.RecordId != ""
case "dwn.v1.EventRecordDeleted.target":
return x.Target != ""
case "dwn.v1.EventRecordDeleted.deleter":
return x.Deleter != ""
case "dwn.v1.EventRecordDeleted.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
x.RecordId = ""
case "dwn.v1.EventRecordDeleted.target":
x.Target = ""
case "dwn.v1.EventRecordDeleted.deleter":
x.Deleter = ""
case "dwn.v1.EventRecordDeleted.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
value := x.RecordId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordDeleted.target":
value := x.Target
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordDeleted.deleter":
value := x.Deleter
return protoreflect.ValueOfString(value)
case "dwn.v1.EventRecordDeleted.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
x.RecordId = value.Interface().(string)
case "dwn.v1.EventRecordDeleted.target":
x.Target = value.Interface().(string)
case "dwn.v1.EventRecordDeleted.deleter":
x.Deleter = value.Interface().(string)
case "dwn.v1.EventRecordDeleted.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
panic(fmt.Errorf("field record_id of message dwn.v1.EventRecordDeleted is not mutable"))
case "dwn.v1.EventRecordDeleted.target":
panic(fmt.Errorf("field target of message dwn.v1.EventRecordDeleted is not mutable"))
case "dwn.v1.EventRecordDeleted.deleter":
panic(fmt.Errorf("field deleter of message dwn.v1.EventRecordDeleted is not mutable"))
case "dwn.v1.EventRecordDeleted.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventRecordDeleted is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventRecordDeleted.record_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordDeleted.target":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordDeleted.deleter":
return protoreflect.ValueOfString("")
case "dwn.v1.EventRecordDeleted.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventRecordDeleted"))
}
panic(fmt.Errorf("message dwn.v1.EventRecordDeleted 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_EventRecordDeleted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventRecordDeleted", 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_EventRecordDeleted) 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_EventRecordDeleted) 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_EventRecordDeleted) 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_EventRecordDeleted) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventRecordDeleted)
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.RecordId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Target)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Deleter)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventRecordDeleted)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x20
}
if len(x.Deleter) > 0 {
i -= len(x.Deleter)
copy(dAtA[i:], x.Deleter)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Deleter)))
i--
dAtA[i] = 0x1a
}
if len(x.Target) > 0 {
i -= len(x.Target)
copy(dAtA[i:], x.Target)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Target)))
i--
dAtA[i] = 0x12
}
if len(x.RecordId) > 0 {
i -= len(x.RecordId)
copy(dAtA[i:], x.RecordId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RecordId)))
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().(*EventRecordDeleted)
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: EventRecordDeleted: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRecordDeleted: 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 RecordId", 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.RecordId = 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 Target", 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.Target = 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 Deleter", 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.Deleter = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventProtocolConfigured protoreflect.MessageDescriptor
fd_EventProtocolConfigured_target protoreflect.FieldDescriptor
fd_EventProtocolConfigured_protocol_uri protoreflect.FieldDescriptor
fd_EventProtocolConfigured_published protoreflect.FieldDescriptor
fd_EventProtocolConfigured_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventProtocolConfigured = File_dwn_v1_events_proto.Messages().ByName("EventProtocolConfigured")
fd_EventProtocolConfigured_target = md_EventProtocolConfigured.Fields().ByName("target")
fd_EventProtocolConfigured_protocol_uri = md_EventProtocolConfigured.Fields().ByName("protocol_uri")
fd_EventProtocolConfigured_published = md_EventProtocolConfigured.Fields().ByName("published")
fd_EventProtocolConfigured_block_height = md_EventProtocolConfigured.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventProtocolConfigured)(nil)
type fastReflection_EventProtocolConfigured EventProtocolConfigured
func (x *EventProtocolConfigured) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventProtocolConfigured)(x)
}
func (x *EventProtocolConfigured) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventProtocolConfigured_messageType fastReflection_EventProtocolConfigured_messageType
var _ protoreflect.MessageType = fastReflection_EventProtocolConfigured_messageType{}
type fastReflection_EventProtocolConfigured_messageType struct{}
func (x fastReflection_EventProtocolConfigured_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventProtocolConfigured)(nil)
}
func (x fastReflection_EventProtocolConfigured_messageType) New() protoreflect.Message {
return new(fastReflection_EventProtocolConfigured)
}
func (x fastReflection_EventProtocolConfigured_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventProtocolConfigured
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventProtocolConfigured) Descriptor() protoreflect.MessageDescriptor {
return md_EventProtocolConfigured
}
// 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_EventProtocolConfigured) Type() protoreflect.MessageType {
return _fastReflection_EventProtocolConfigured_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventProtocolConfigured) New() protoreflect.Message {
return new(fastReflection_EventProtocolConfigured)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventProtocolConfigured) Interface() protoreflect.ProtoMessage {
return (*EventProtocolConfigured)(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_EventProtocolConfigured) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Target != "" {
value := protoreflect.ValueOfString(x.Target)
if !f(fd_EventProtocolConfigured_target, value) {
return
}
}
if x.ProtocolUri != "" {
value := protoreflect.ValueOfString(x.ProtocolUri)
if !f(fd_EventProtocolConfigured_protocol_uri, value) {
return
}
}
if x.Published != false {
value := protoreflect.ValueOfBool(x.Published)
if !f(fd_EventProtocolConfigured_published, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventProtocolConfigured_block_height, 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_EventProtocolConfigured) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
return x.Target != ""
case "dwn.v1.EventProtocolConfigured.protocol_uri":
return x.ProtocolUri != ""
case "dwn.v1.EventProtocolConfigured.published":
return x.Published != false
case "dwn.v1.EventProtocolConfigured.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
x.Target = ""
case "dwn.v1.EventProtocolConfigured.protocol_uri":
x.ProtocolUri = ""
case "dwn.v1.EventProtocolConfigured.published":
x.Published = false
case "dwn.v1.EventProtocolConfigured.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
value := x.Target
return protoreflect.ValueOfString(value)
case "dwn.v1.EventProtocolConfigured.protocol_uri":
value := x.ProtocolUri
return protoreflect.ValueOfString(value)
case "dwn.v1.EventProtocolConfigured.published":
value := x.Published
return protoreflect.ValueOfBool(value)
case "dwn.v1.EventProtocolConfigured.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
x.Target = value.Interface().(string)
case "dwn.v1.EventProtocolConfigured.protocol_uri":
x.ProtocolUri = value.Interface().(string)
case "dwn.v1.EventProtocolConfigured.published":
x.Published = value.Bool()
case "dwn.v1.EventProtocolConfigured.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
panic(fmt.Errorf("field target of message dwn.v1.EventProtocolConfigured is not mutable"))
case "dwn.v1.EventProtocolConfigured.protocol_uri":
panic(fmt.Errorf("field protocol_uri of message dwn.v1.EventProtocolConfigured is not mutable"))
case "dwn.v1.EventProtocolConfigured.published":
panic(fmt.Errorf("field published of message dwn.v1.EventProtocolConfigured is not mutable"))
case "dwn.v1.EventProtocolConfigured.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventProtocolConfigured is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventProtocolConfigured.target":
return protoreflect.ValueOfString("")
case "dwn.v1.EventProtocolConfigured.protocol_uri":
return protoreflect.ValueOfString("")
case "dwn.v1.EventProtocolConfigured.published":
return protoreflect.ValueOfBool(false)
case "dwn.v1.EventProtocolConfigured.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventProtocolConfigured"))
}
panic(fmt.Errorf("message dwn.v1.EventProtocolConfigured 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_EventProtocolConfigured) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventProtocolConfigured", 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_EventProtocolConfigured) 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_EventProtocolConfigured) 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_EventProtocolConfigured) 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_EventProtocolConfigured) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventProtocolConfigured)
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.Target)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.ProtocolUri)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Published {
n += 2
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventProtocolConfigured)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x20
}
if x.Published {
i--
if x.Published {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x18
}
if len(x.ProtocolUri) > 0 {
i -= len(x.ProtocolUri)
copy(dAtA[i:], x.ProtocolUri)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProtocolUri)))
i--
dAtA[i] = 0x12
}
if len(x.Target) > 0 {
i -= len(x.Target)
copy(dAtA[i:], x.Target)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Target)))
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().(*EventProtocolConfigured)
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: EventProtocolConfigured: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventProtocolConfigured: 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 Target", 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.Target = 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 ProtocolUri", 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.ProtocolUri = 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 Published", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.Published = bool(v != 0)
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventPermissionGranted protoreflect.MessageDescriptor
fd_EventPermissionGranted_permission_id protoreflect.FieldDescriptor
fd_EventPermissionGranted_grantor protoreflect.FieldDescriptor
fd_EventPermissionGranted_grantee protoreflect.FieldDescriptor
fd_EventPermissionGranted_interface_name protoreflect.FieldDescriptor
fd_EventPermissionGranted_method protoreflect.FieldDescriptor
fd_EventPermissionGranted_expires_at protoreflect.FieldDescriptor
fd_EventPermissionGranted_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventPermissionGranted = File_dwn_v1_events_proto.Messages().ByName("EventPermissionGranted")
fd_EventPermissionGranted_permission_id = md_EventPermissionGranted.Fields().ByName("permission_id")
fd_EventPermissionGranted_grantor = md_EventPermissionGranted.Fields().ByName("grantor")
fd_EventPermissionGranted_grantee = md_EventPermissionGranted.Fields().ByName("grantee")
fd_EventPermissionGranted_interface_name = md_EventPermissionGranted.Fields().ByName("interface_name")
fd_EventPermissionGranted_method = md_EventPermissionGranted.Fields().ByName("method")
fd_EventPermissionGranted_expires_at = md_EventPermissionGranted.Fields().ByName("expires_at")
fd_EventPermissionGranted_block_height = md_EventPermissionGranted.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventPermissionGranted)(nil)
type fastReflection_EventPermissionGranted EventPermissionGranted
func (x *EventPermissionGranted) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventPermissionGranted)(x)
}
func (x *EventPermissionGranted) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventPermissionGranted_messageType fastReflection_EventPermissionGranted_messageType
var _ protoreflect.MessageType = fastReflection_EventPermissionGranted_messageType{}
type fastReflection_EventPermissionGranted_messageType struct{}
func (x fastReflection_EventPermissionGranted_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventPermissionGranted)(nil)
}
func (x fastReflection_EventPermissionGranted_messageType) New() protoreflect.Message {
return new(fastReflection_EventPermissionGranted)
}
func (x fastReflection_EventPermissionGranted_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventPermissionGranted
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventPermissionGranted) Descriptor() protoreflect.MessageDescriptor {
return md_EventPermissionGranted
}
// 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_EventPermissionGranted) Type() protoreflect.MessageType {
return _fastReflection_EventPermissionGranted_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventPermissionGranted) New() protoreflect.Message {
return new(fastReflection_EventPermissionGranted)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventPermissionGranted) Interface() protoreflect.ProtoMessage {
return (*EventPermissionGranted)(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_EventPermissionGranted) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.PermissionId != "" {
value := protoreflect.ValueOfString(x.PermissionId)
if !f(fd_EventPermissionGranted_permission_id, value) {
return
}
}
if x.Grantor != "" {
value := protoreflect.ValueOfString(x.Grantor)
if !f(fd_EventPermissionGranted_grantor, value) {
return
}
}
if x.Grantee != "" {
value := protoreflect.ValueOfString(x.Grantee)
if !f(fd_EventPermissionGranted_grantee, value) {
return
}
}
if x.InterfaceName != "" {
value := protoreflect.ValueOfString(x.InterfaceName)
if !f(fd_EventPermissionGranted_interface_name, value) {
return
}
}
if x.Method != "" {
value := protoreflect.ValueOfString(x.Method)
if !f(fd_EventPermissionGranted_method, value) {
return
}
}
if x.ExpiresAt != nil {
value := protoreflect.ValueOfMessage(x.ExpiresAt.ProtoReflect())
if !f(fd_EventPermissionGranted_expires_at, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventPermissionGranted_block_height, 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_EventPermissionGranted) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventPermissionGranted.permission_id":
return x.PermissionId != ""
case "dwn.v1.EventPermissionGranted.grantor":
return x.Grantor != ""
case "dwn.v1.EventPermissionGranted.grantee":
return x.Grantee != ""
case "dwn.v1.EventPermissionGranted.interface_name":
return x.InterfaceName != ""
case "dwn.v1.EventPermissionGranted.method":
return x.Method != ""
case "dwn.v1.EventPermissionGranted.expires_at":
return x.ExpiresAt != nil
case "dwn.v1.EventPermissionGranted.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventPermissionGranted.permission_id":
x.PermissionId = ""
case "dwn.v1.EventPermissionGranted.grantor":
x.Grantor = ""
case "dwn.v1.EventPermissionGranted.grantee":
x.Grantee = ""
case "dwn.v1.EventPermissionGranted.interface_name":
x.InterfaceName = ""
case "dwn.v1.EventPermissionGranted.method":
x.Method = ""
case "dwn.v1.EventPermissionGranted.expires_at":
x.ExpiresAt = nil
case "dwn.v1.EventPermissionGranted.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventPermissionGranted.permission_id":
value := x.PermissionId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionGranted.grantor":
value := x.Grantor
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionGranted.grantee":
value := x.Grantee
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionGranted.interface_name":
value := x.InterfaceName
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionGranted.method":
value := x.Method
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionGranted.expires_at":
value := x.ExpiresAt
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "dwn.v1.EventPermissionGranted.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventPermissionGranted.permission_id":
x.PermissionId = value.Interface().(string)
case "dwn.v1.EventPermissionGranted.grantor":
x.Grantor = value.Interface().(string)
case "dwn.v1.EventPermissionGranted.grantee":
x.Grantee = value.Interface().(string)
case "dwn.v1.EventPermissionGranted.interface_name":
x.InterfaceName = value.Interface().(string)
case "dwn.v1.EventPermissionGranted.method":
x.Method = value.Interface().(string)
case "dwn.v1.EventPermissionGranted.expires_at":
x.ExpiresAt = value.Message().Interface().(*timestamppb.Timestamp)
case "dwn.v1.EventPermissionGranted.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventPermissionGranted.expires_at":
if x.ExpiresAt == nil {
x.ExpiresAt = new(timestamppb.Timestamp)
}
return protoreflect.ValueOfMessage(x.ExpiresAt.ProtoReflect())
case "dwn.v1.EventPermissionGranted.permission_id":
panic(fmt.Errorf("field permission_id of message dwn.v1.EventPermissionGranted is not mutable"))
case "dwn.v1.EventPermissionGranted.grantor":
panic(fmt.Errorf("field grantor of message dwn.v1.EventPermissionGranted is not mutable"))
case "dwn.v1.EventPermissionGranted.grantee":
panic(fmt.Errorf("field grantee of message dwn.v1.EventPermissionGranted is not mutable"))
case "dwn.v1.EventPermissionGranted.interface_name":
panic(fmt.Errorf("field interface_name of message dwn.v1.EventPermissionGranted is not mutable"))
case "dwn.v1.EventPermissionGranted.method":
panic(fmt.Errorf("field method of message dwn.v1.EventPermissionGranted is not mutable"))
case "dwn.v1.EventPermissionGranted.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventPermissionGranted is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventPermissionGranted.permission_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionGranted.grantor":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionGranted.grantee":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionGranted.interface_name":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionGranted.method":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionGranted.expires_at":
m := new(timestamppb.Timestamp)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "dwn.v1.EventPermissionGranted.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionGranted"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionGranted 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_EventPermissionGranted) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventPermissionGranted", 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_EventPermissionGranted) 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_EventPermissionGranted) 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_EventPermissionGranted) 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_EventPermissionGranted) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventPermissionGranted)
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.PermissionId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Grantor)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Grantee)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.InterfaceName)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Method)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.ExpiresAt != nil {
l = options.Size(x.ExpiresAt)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventPermissionGranted)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x38
}
if x.ExpiresAt != nil {
encoded, err := options.Marshal(x.ExpiresAt)
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 len(x.Method) > 0 {
i -= len(x.Method)
copy(dAtA[i:], x.Method)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Method)))
i--
dAtA[i] = 0x2a
}
if len(x.InterfaceName) > 0 {
i -= len(x.InterfaceName)
copy(dAtA[i:], x.InterfaceName)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InterfaceName)))
i--
dAtA[i] = 0x22
}
if len(x.Grantee) > 0 {
i -= len(x.Grantee)
copy(dAtA[i:], x.Grantee)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantee)))
i--
dAtA[i] = 0x1a
}
if len(x.Grantor) > 0 {
i -= len(x.Grantor)
copy(dAtA[i:], x.Grantor)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grantor)))
i--
dAtA[i] = 0x12
}
if len(x.PermissionId) > 0 {
i -= len(x.PermissionId)
copy(dAtA[i:], x.PermissionId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PermissionId)))
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().(*EventPermissionGranted)
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: EventPermissionGranted: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPermissionGranted: 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 PermissionId", 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.PermissionId = 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 Grantor", 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.Grantor = 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 Grantee", 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.Grantee = 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 InterfaceName", 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.InterfaceName = 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 Method", 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.Method = 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 ExpiresAt", 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.ExpiresAt == nil {
x.ExpiresAt = &timestamppb.Timestamp{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExpiresAt); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 7:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventPermissionRevoked protoreflect.MessageDescriptor
fd_EventPermissionRevoked_permission_id protoreflect.FieldDescriptor
fd_EventPermissionRevoked_revoker protoreflect.FieldDescriptor
fd_EventPermissionRevoked_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventPermissionRevoked = File_dwn_v1_events_proto.Messages().ByName("EventPermissionRevoked")
fd_EventPermissionRevoked_permission_id = md_EventPermissionRevoked.Fields().ByName("permission_id")
fd_EventPermissionRevoked_revoker = md_EventPermissionRevoked.Fields().ByName("revoker")
fd_EventPermissionRevoked_block_height = md_EventPermissionRevoked.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventPermissionRevoked)(nil)
type fastReflection_EventPermissionRevoked EventPermissionRevoked
func (x *EventPermissionRevoked) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventPermissionRevoked)(x)
}
func (x *EventPermissionRevoked) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventPermissionRevoked_messageType fastReflection_EventPermissionRevoked_messageType
var _ protoreflect.MessageType = fastReflection_EventPermissionRevoked_messageType{}
type fastReflection_EventPermissionRevoked_messageType struct{}
func (x fastReflection_EventPermissionRevoked_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventPermissionRevoked)(nil)
}
func (x fastReflection_EventPermissionRevoked_messageType) New() protoreflect.Message {
return new(fastReflection_EventPermissionRevoked)
}
func (x fastReflection_EventPermissionRevoked_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventPermissionRevoked
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventPermissionRevoked) Descriptor() protoreflect.MessageDescriptor {
return md_EventPermissionRevoked
}
// 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_EventPermissionRevoked) Type() protoreflect.MessageType {
return _fastReflection_EventPermissionRevoked_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventPermissionRevoked) New() protoreflect.Message {
return new(fastReflection_EventPermissionRevoked)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventPermissionRevoked) Interface() protoreflect.ProtoMessage {
return (*EventPermissionRevoked)(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_EventPermissionRevoked) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.PermissionId != "" {
value := protoreflect.ValueOfString(x.PermissionId)
if !f(fd_EventPermissionRevoked_permission_id, value) {
return
}
}
if x.Revoker != "" {
value := protoreflect.ValueOfString(x.Revoker)
if !f(fd_EventPermissionRevoked_revoker, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventPermissionRevoked_block_height, 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_EventPermissionRevoked) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
return x.PermissionId != ""
case "dwn.v1.EventPermissionRevoked.revoker":
return x.Revoker != ""
case "dwn.v1.EventPermissionRevoked.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
x.PermissionId = ""
case "dwn.v1.EventPermissionRevoked.revoker":
x.Revoker = ""
case "dwn.v1.EventPermissionRevoked.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
value := x.PermissionId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionRevoked.revoker":
value := x.Revoker
return protoreflect.ValueOfString(value)
case "dwn.v1.EventPermissionRevoked.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
x.PermissionId = value.Interface().(string)
case "dwn.v1.EventPermissionRevoked.revoker":
x.Revoker = value.Interface().(string)
case "dwn.v1.EventPermissionRevoked.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
panic(fmt.Errorf("field permission_id of message dwn.v1.EventPermissionRevoked is not mutable"))
case "dwn.v1.EventPermissionRevoked.revoker":
panic(fmt.Errorf("field revoker of message dwn.v1.EventPermissionRevoked is not mutable"))
case "dwn.v1.EventPermissionRevoked.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventPermissionRevoked is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventPermissionRevoked.permission_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionRevoked.revoker":
return protoreflect.ValueOfString("")
case "dwn.v1.EventPermissionRevoked.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventPermissionRevoked"))
}
panic(fmt.Errorf("message dwn.v1.EventPermissionRevoked 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_EventPermissionRevoked) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventPermissionRevoked", 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_EventPermissionRevoked) 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_EventPermissionRevoked) 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_EventPermissionRevoked) 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_EventPermissionRevoked) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventPermissionRevoked)
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.PermissionId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Revoker)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventPermissionRevoked)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x18
}
if len(x.Revoker) > 0 {
i -= len(x.Revoker)
copy(dAtA[i:], x.Revoker)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Revoker)))
i--
dAtA[i] = 0x12
}
if len(x.PermissionId) > 0 {
i -= len(x.PermissionId)
copy(dAtA[i:], x.PermissionId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PermissionId)))
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().(*EventPermissionRevoked)
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: EventPermissionRevoked: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventPermissionRevoked: 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 PermissionId", 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.PermissionId = 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 Revoker", 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.Revoker = 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 BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventVaultCreated protoreflect.MessageDescriptor
fd_EventVaultCreated_vault_id protoreflect.FieldDescriptor
fd_EventVaultCreated_owner protoreflect.FieldDescriptor
fd_EventVaultCreated_public_key protoreflect.FieldDescriptor
fd_EventVaultCreated_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventVaultCreated = File_dwn_v1_events_proto.Messages().ByName("EventVaultCreated")
fd_EventVaultCreated_vault_id = md_EventVaultCreated.Fields().ByName("vault_id")
fd_EventVaultCreated_owner = md_EventVaultCreated.Fields().ByName("owner")
fd_EventVaultCreated_public_key = md_EventVaultCreated.Fields().ByName("public_key")
fd_EventVaultCreated_block_height = md_EventVaultCreated.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventVaultCreated)(nil)
type fastReflection_EventVaultCreated EventVaultCreated
func (x *EventVaultCreated) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventVaultCreated)(x)
}
func (x *EventVaultCreated) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventVaultCreated_messageType fastReflection_EventVaultCreated_messageType
var _ protoreflect.MessageType = fastReflection_EventVaultCreated_messageType{}
type fastReflection_EventVaultCreated_messageType struct{}
func (x fastReflection_EventVaultCreated_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventVaultCreated)(nil)
}
func (x fastReflection_EventVaultCreated_messageType) New() protoreflect.Message {
return new(fastReflection_EventVaultCreated)
}
func (x fastReflection_EventVaultCreated_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventVaultCreated
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventVaultCreated) Descriptor() protoreflect.MessageDescriptor {
return md_EventVaultCreated
}
// 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_EventVaultCreated) Type() protoreflect.MessageType {
return _fastReflection_EventVaultCreated_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventVaultCreated) New() protoreflect.Message {
return new(fastReflection_EventVaultCreated)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventVaultCreated) Interface() protoreflect.ProtoMessage {
return (*EventVaultCreated)(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_EventVaultCreated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.VaultId != "" {
value := protoreflect.ValueOfString(x.VaultId)
if !f(fd_EventVaultCreated_vault_id, value) {
return
}
}
if x.Owner != "" {
value := protoreflect.ValueOfString(x.Owner)
if !f(fd_EventVaultCreated_owner, value) {
return
}
}
if x.PublicKey != "" {
value := protoreflect.ValueOfString(x.PublicKey)
if !f(fd_EventVaultCreated_public_key, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventVaultCreated_block_height, 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_EventVaultCreated) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
return x.VaultId != ""
case "dwn.v1.EventVaultCreated.owner":
return x.Owner != ""
case "dwn.v1.EventVaultCreated.public_key":
return x.PublicKey != ""
case "dwn.v1.EventVaultCreated.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
x.VaultId = ""
case "dwn.v1.EventVaultCreated.owner":
x.Owner = ""
case "dwn.v1.EventVaultCreated.public_key":
x.PublicKey = ""
case "dwn.v1.EventVaultCreated.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
value := x.VaultId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultCreated.owner":
value := x.Owner
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultCreated.public_key":
value := x.PublicKey
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultCreated.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
x.VaultId = value.Interface().(string)
case "dwn.v1.EventVaultCreated.owner":
x.Owner = value.Interface().(string)
case "dwn.v1.EventVaultCreated.public_key":
x.PublicKey = value.Interface().(string)
case "dwn.v1.EventVaultCreated.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
panic(fmt.Errorf("field vault_id of message dwn.v1.EventVaultCreated is not mutable"))
case "dwn.v1.EventVaultCreated.owner":
panic(fmt.Errorf("field owner of message dwn.v1.EventVaultCreated is not mutable"))
case "dwn.v1.EventVaultCreated.public_key":
panic(fmt.Errorf("field public_key of message dwn.v1.EventVaultCreated is not mutable"))
case "dwn.v1.EventVaultCreated.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventVaultCreated is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventVaultCreated.vault_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultCreated.owner":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultCreated.public_key":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultCreated.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultCreated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultCreated 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_EventVaultCreated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventVaultCreated", 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_EventVaultCreated) 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_EventVaultCreated) 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_EventVaultCreated) 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_EventVaultCreated) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventVaultCreated)
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.VaultId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Owner)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.PublicKey)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventVaultCreated)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x20
}
if len(x.PublicKey) > 0 {
i -= len(x.PublicKey)
copy(dAtA[i:], x.PublicKey)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKey)))
i--
dAtA[i] = 0x1a
}
if len(x.Owner) > 0 {
i -= len(x.Owner)
copy(dAtA[i:], x.Owner)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner)))
i--
dAtA[i] = 0x12
}
if len(x.VaultId) > 0 {
i -= len(x.VaultId)
copy(dAtA[i:], x.VaultId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VaultId)))
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().(*EventVaultCreated)
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: EventVaultCreated: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventVaultCreated: 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 VaultId", 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.VaultId = 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 Owner", 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.Owner = 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 PublicKey", 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.PublicKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventVaultKeysRotated protoreflect.MessageDescriptor
fd_EventVaultKeysRotated_vault_id protoreflect.FieldDescriptor
fd_EventVaultKeysRotated_owner protoreflect.FieldDescriptor
fd_EventVaultKeysRotated_new_public_key protoreflect.FieldDescriptor
fd_EventVaultKeysRotated_rotation_height protoreflect.FieldDescriptor
fd_EventVaultKeysRotated_block_height protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventVaultKeysRotated = File_dwn_v1_events_proto.Messages().ByName("EventVaultKeysRotated")
fd_EventVaultKeysRotated_vault_id = md_EventVaultKeysRotated.Fields().ByName("vault_id")
fd_EventVaultKeysRotated_owner = md_EventVaultKeysRotated.Fields().ByName("owner")
fd_EventVaultKeysRotated_new_public_key = md_EventVaultKeysRotated.Fields().ByName("new_public_key")
fd_EventVaultKeysRotated_rotation_height = md_EventVaultKeysRotated.Fields().ByName("rotation_height")
fd_EventVaultKeysRotated_block_height = md_EventVaultKeysRotated.Fields().ByName("block_height")
}
var _ protoreflect.Message = (*fastReflection_EventVaultKeysRotated)(nil)
type fastReflection_EventVaultKeysRotated EventVaultKeysRotated
func (x *EventVaultKeysRotated) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventVaultKeysRotated)(x)
}
func (x *EventVaultKeysRotated) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventVaultKeysRotated_messageType fastReflection_EventVaultKeysRotated_messageType
var _ protoreflect.MessageType = fastReflection_EventVaultKeysRotated_messageType{}
type fastReflection_EventVaultKeysRotated_messageType struct{}
func (x fastReflection_EventVaultKeysRotated_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventVaultKeysRotated)(nil)
}
func (x fastReflection_EventVaultKeysRotated_messageType) New() protoreflect.Message {
return new(fastReflection_EventVaultKeysRotated)
}
func (x fastReflection_EventVaultKeysRotated_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventVaultKeysRotated
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventVaultKeysRotated) Descriptor() protoreflect.MessageDescriptor {
return md_EventVaultKeysRotated
}
// 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_EventVaultKeysRotated) Type() protoreflect.MessageType {
return _fastReflection_EventVaultKeysRotated_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventVaultKeysRotated) New() protoreflect.Message {
return new(fastReflection_EventVaultKeysRotated)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventVaultKeysRotated) Interface() protoreflect.ProtoMessage {
return (*EventVaultKeysRotated)(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_EventVaultKeysRotated) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.VaultId != "" {
value := protoreflect.ValueOfString(x.VaultId)
if !f(fd_EventVaultKeysRotated_vault_id, value) {
return
}
}
if x.Owner != "" {
value := protoreflect.ValueOfString(x.Owner)
if !f(fd_EventVaultKeysRotated_owner, value) {
return
}
}
if x.NewPublicKey != "" {
value := protoreflect.ValueOfString(x.NewPublicKey)
if !f(fd_EventVaultKeysRotated_new_public_key, value) {
return
}
}
if x.RotationHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.RotationHeight)
if !f(fd_EventVaultKeysRotated_rotation_height, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventVaultKeysRotated_block_height, 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_EventVaultKeysRotated) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
return x.VaultId != ""
case "dwn.v1.EventVaultKeysRotated.owner":
return x.Owner != ""
case "dwn.v1.EventVaultKeysRotated.new_public_key":
return x.NewPublicKey != ""
case "dwn.v1.EventVaultKeysRotated.rotation_height":
return x.RotationHeight != uint64(0)
case "dwn.v1.EventVaultKeysRotated.block_height":
return x.BlockHeight != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
x.VaultId = ""
case "dwn.v1.EventVaultKeysRotated.owner":
x.Owner = ""
case "dwn.v1.EventVaultKeysRotated.new_public_key":
x.NewPublicKey = ""
case "dwn.v1.EventVaultKeysRotated.rotation_height":
x.RotationHeight = uint64(0)
case "dwn.v1.EventVaultKeysRotated.block_height":
x.BlockHeight = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
value := x.VaultId
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultKeysRotated.owner":
value := x.Owner
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultKeysRotated.new_public_key":
value := x.NewPublicKey
return protoreflect.ValueOfString(value)
case "dwn.v1.EventVaultKeysRotated.rotation_height":
value := x.RotationHeight
return protoreflect.ValueOfUint64(value)
case "dwn.v1.EventVaultKeysRotated.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
x.VaultId = value.Interface().(string)
case "dwn.v1.EventVaultKeysRotated.owner":
x.Owner = value.Interface().(string)
case "dwn.v1.EventVaultKeysRotated.new_public_key":
x.NewPublicKey = value.Interface().(string)
case "dwn.v1.EventVaultKeysRotated.rotation_height":
x.RotationHeight = value.Uint()
case "dwn.v1.EventVaultKeysRotated.block_height":
x.BlockHeight = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
panic(fmt.Errorf("field vault_id of message dwn.v1.EventVaultKeysRotated is not mutable"))
case "dwn.v1.EventVaultKeysRotated.owner":
panic(fmt.Errorf("field owner of message dwn.v1.EventVaultKeysRotated is not mutable"))
case "dwn.v1.EventVaultKeysRotated.new_public_key":
panic(fmt.Errorf("field new_public_key of message dwn.v1.EventVaultKeysRotated is not mutable"))
case "dwn.v1.EventVaultKeysRotated.rotation_height":
panic(fmt.Errorf("field rotation_height of message dwn.v1.EventVaultKeysRotated is not mutable"))
case "dwn.v1.EventVaultKeysRotated.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventVaultKeysRotated is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventVaultKeysRotated.vault_id":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultKeysRotated.owner":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultKeysRotated.new_public_key":
return protoreflect.ValueOfString("")
case "dwn.v1.EventVaultKeysRotated.rotation_height":
return protoreflect.ValueOfUint64(uint64(0))
case "dwn.v1.EventVaultKeysRotated.block_height":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventVaultKeysRotated"))
}
panic(fmt.Errorf("message dwn.v1.EventVaultKeysRotated 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_EventVaultKeysRotated) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventVaultKeysRotated", 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_EventVaultKeysRotated) 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_EventVaultKeysRotated) 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_EventVaultKeysRotated) 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_EventVaultKeysRotated) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventVaultKeysRotated)
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.VaultId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Owner)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.NewPublicKey)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.RotationHeight != 0 {
n += 1 + runtime.Sov(uint64(x.RotationHeight))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
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().(*EventVaultKeysRotated)
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.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x28
}
if x.RotationHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.RotationHeight))
i--
dAtA[i] = 0x20
}
if len(x.NewPublicKey) > 0 {
i -= len(x.NewPublicKey)
copy(dAtA[i:], x.NewPublicKey)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewPublicKey)))
i--
dAtA[i] = 0x1a
}
if len(x.Owner) > 0 {
i -= len(x.Owner)
copy(dAtA[i:], x.Owner)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner)))
i--
dAtA[i] = 0x12
}
if len(x.VaultId) > 0 {
i -= len(x.VaultId)
copy(dAtA[i:], x.VaultId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.VaultId)))
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().(*EventVaultKeysRotated)
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: EventVaultKeysRotated: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventVaultKeysRotated: 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 VaultId", 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.VaultId = 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 Owner", 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.Owner = 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 NewPublicKey", 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.NewPublicKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RotationHeight", wireType)
}
x.RotationHeight = 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.RotationHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_EventKeyRotation protoreflect.MessageDescriptor
fd_EventKeyRotation_old_key_version protoreflect.FieldDescriptor
fd_EventKeyRotation_new_key_version protoreflect.FieldDescriptor
fd_EventKeyRotation_reason protoreflect.FieldDescriptor
fd_EventKeyRotation_block_height protoreflect.FieldDescriptor
fd_EventKeyRotation_single_node_mode protoreflect.FieldDescriptor
fd_EventKeyRotation_validator_count protoreflect.FieldDescriptor
)
func init() {
file_dwn_v1_events_proto_init()
md_EventKeyRotation = File_dwn_v1_events_proto.Messages().ByName("EventKeyRotation")
fd_EventKeyRotation_old_key_version = md_EventKeyRotation.Fields().ByName("old_key_version")
fd_EventKeyRotation_new_key_version = md_EventKeyRotation.Fields().ByName("new_key_version")
fd_EventKeyRotation_reason = md_EventKeyRotation.Fields().ByName("reason")
fd_EventKeyRotation_block_height = md_EventKeyRotation.Fields().ByName("block_height")
fd_EventKeyRotation_single_node_mode = md_EventKeyRotation.Fields().ByName("single_node_mode")
fd_EventKeyRotation_validator_count = md_EventKeyRotation.Fields().ByName("validator_count")
}
var _ protoreflect.Message = (*fastReflection_EventKeyRotation)(nil)
type fastReflection_EventKeyRotation EventKeyRotation
func (x *EventKeyRotation) ProtoReflect() protoreflect.Message {
return (*fastReflection_EventKeyRotation)(x)
}
func (x *EventKeyRotation) slowProtoReflect() protoreflect.Message {
mi := &file_dwn_v1_events_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_EventKeyRotation_messageType fastReflection_EventKeyRotation_messageType
var _ protoreflect.MessageType = fastReflection_EventKeyRotation_messageType{}
type fastReflection_EventKeyRotation_messageType struct{}
func (x fastReflection_EventKeyRotation_messageType) Zero() protoreflect.Message {
return (*fastReflection_EventKeyRotation)(nil)
}
func (x fastReflection_EventKeyRotation_messageType) New() protoreflect.Message {
return new(fastReflection_EventKeyRotation)
}
func (x fastReflection_EventKeyRotation_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_EventKeyRotation
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_EventKeyRotation) Descriptor() protoreflect.MessageDescriptor {
return md_EventKeyRotation
}
// 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_EventKeyRotation) Type() protoreflect.MessageType {
return _fastReflection_EventKeyRotation_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_EventKeyRotation) New() protoreflect.Message {
return new(fastReflection_EventKeyRotation)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_EventKeyRotation) Interface() protoreflect.ProtoMessage {
return (*EventKeyRotation)(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_EventKeyRotation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.OldKeyVersion != uint64(0) {
value := protoreflect.ValueOfUint64(x.OldKeyVersion)
if !f(fd_EventKeyRotation_old_key_version, value) {
return
}
}
if x.NewKeyVersion != uint64(0) {
value := protoreflect.ValueOfUint64(x.NewKeyVersion)
if !f(fd_EventKeyRotation_new_key_version, value) {
return
}
}
if x.Reason != "" {
value := protoreflect.ValueOfString(x.Reason)
if !f(fd_EventKeyRotation_reason, value) {
return
}
}
if x.BlockHeight != uint64(0) {
value := protoreflect.ValueOfUint64(x.BlockHeight)
if !f(fd_EventKeyRotation_block_height, value) {
return
}
}
if x.SingleNodeMode != false {
value := protoreflect.ValueOfBool(x.SingleNodeMode)
if !f(fd_EventKeyRotation_single_node_mode, value) {
return
}
}
if x.ValidatorCount != uint32(0) {
value := protoreflect.ValueOfUint32(x.ValidatorCount)
if !f(fd_EventKeyRotation_validator_count, 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_EventKeyRotation) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
return x.OldKeyVersion != uint64(0)
case "dwn.v1.EventKeyRotation.new_key_version":
return x.NewKeyVersion != uint64(0)
case "dwn.v1.EventKeyRotation.reason":
return x.Reason != ""
case "dwn.v1.EventKeyRotation.block_height":
return x.BlockHeight != uint64(0)
case "dwn.v1.EventKeyRotation.single_node_mode":
return x.SingleNodeMode != false
case "dwn.v1.EventKeyRotation.validator_count":
return x.ValidatorCount != uint32(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
x.OldKeyVersion = uint64(0)
case "dwn.v1.EventKeyRotation.new_key_version":
x.NewKeyVersion = uint64(0)
case "dwn.v1.EventKeyRotation.reason":
x.Reason = ""
case "dwn.v1.EventKeyRotation.block_height":
x.BlockHeight = uint64(0)
case "dwn.v1.EventKeyRotation.single_node_mode":
x.SingleNodeMode = false
case "dwn.v1.EventKeyRotation.validator_count":
x.ValidatorCount = uint32(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
value := x.OldKeyVersion
return protoreflect.ValueOfUint64(value)
case "dwn.v1.EventKeyRotation.new_key_version":
value := x.NewKeyVersion
return protoreflect.ValueOfUint64(value)
case "dwn.v1.EventKeyRotation.reason":
value := x.Reason
return protoreflect.ValueOfString(value)
case "dwn.v1.EventKeyRotation.block_height":
value := x.BlockHeight
return protoreflect.ValueOfUint64(value)
case "dwn.v1.EventKeyRotation.single_node_mode":
value := x.SingleNodeMode
return protoreflect.ValueOfBool(value)
case "dwn.v1.EventKeyRotation.validator_count":
value := x.ValidatorCount
return protoreflect.ValueOfUint32(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
x.OldKeyVersion = value.Uint()
case "dwn.v1.EventKeyRotation.new_key_version":
x.NewKeyVersion = value.Uint()
case "dwn.v1.EventKeyRotation.reason":
x.Reason = value.Interface().(string)
case "dwn.v1.EventKeyRotation.block_height":
x.BlockHeight = value.Uint()
case "dwn.v1.EventKeyRotation.single_node_mode":
x.SingleNodeMode = value.Bool()
case "dwn.v1.EventKeyRotation.validator_count":
x.ValidatorCount = uint32(value.Uint())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
panic(fmt.Errorf("field old_key_version of message dwn.v1.EventKeyRotation is not mutable"))
case "dwn.v1.EventKeyRotation.new_key_version":
panic(fmt.Errorf("field new_key_version of message dwn.v1.EventKeyRotation is not mutable"))
case "dwn.v1.EventKeyRotation.reason":
panic(fmt.Errorf("field reason of message dwn.v1.EventKeyRotation is not mutable"))
case "dwn.v1.EventKeyRotation.block_height":
panic(fmt.Errorf("field block_height of message dwn.v1.EventKeyRotation is not mutable"))
case "dwn.v1.EventKeyRotation.single_node_mode":
panic(fmt.Errorf("field single_node_mode of message dwn.v1.EventKeyRotation is not mutable"))
case "dwn.v1.EventKeyRotation.validator_count":
panic(fmt.Errorf("field validator_count of message dwn.v1.EventKeyRotation is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "dwn.v1.EventKeyRotation.old_key_version":
return protoreflect.ValueOfUint64(uint64(0))
case "dwn.v1.EventKeyRotation.new_key_version":
return protoreflect.ValueOfUint64(uint64(0))
case "dwn.v1.EventKeyRotation.reason":
return protoreflect.ValueOfString("")
case "dwn.v1.EventKeyRotation.block_height":
return protoreflect.ValueOfUint64(uint64(0))
case "dwn.v1.EventKeyRotation.single_node_mode":
return protoreflect.ValueOfBool(false)
case "dwn.v1.EventKeyRotation.validator_count":
return protoreflect.ValueOfUint32(uint32(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.EventKeyRotation"))
}
panic(fmt.Errorf("message dwn.v1.EventKeyRotation 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_EventKeyRotation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.EventKeyRotation", 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_EventKeyRotation) 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_EventKeyRotation) 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_EventKeyRotation) 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_EventKeyRotation) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*EventKeyRotation)
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.OldKeyVersion != 0 {
n += 1 + runtime.Sov(uint64(x.OldKeyVersion))
}
if x.NewKeyVersion != 0 {
n += 1 + runtime.Sov(uint64(x.NewKeyVersion))
}
l = len(x.Reason)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.BlockHeight != 0 {
n += 1 + runtime.Sov(uint64(x.BlockHeight))
}
if x.SingleNodeMode {
n += 2
}
if x.ValidatorCount != 0 {
n += 1 + runtime.Sov(uint64(x.ValidatorCount))
}
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().(*EventKeyRotation)
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.ValidatorCount != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorCount))
i--
dAtA[i] = 0x30
}
if x.SingleNodeMode {
i--
if x.SingleNodeMode {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i--
dAtA[i] = 0x28
}
if x.BlockHeight != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight))
i--
dAtA[i] = 0x20
}
if len(x.Reason) > 0 {
i -= len(x.Reason)
copy(dAtA[i:], x.Reason)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reason)))
i--
dAtA[i] = 0x1a
}
if x.NewKeyVersion != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.NewKeyVersion))
i--
dAtA[i] = 0x10
}
if x.OldKeyVersion != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.OldKeyVersion))
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().(*EventKeyRotation)
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: EventKeyRotation: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventKeyRotation: 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 OldKeyVersion", wireType)
}
x.OldKeyVersion = 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.OldKeyVersion |= uint64(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 NewKeyVersion", wireType)
}
x.NewKeyVersion = 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.NewKeyVersion |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType)
}
x.BlockHeight = 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.BlockHeight |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SingleNodeMode", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
x.SingleNodeMode = bool(v != 0)
case 6:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorCount", wireType)
}
x.ValidatorCount = 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.ValidatorCount |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: dwn/v1/events.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)
)
// EventRecordWritten is emitted when a record is written to DWN
type EventRecordWritten struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Record ID
RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
// Target DID
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
// Protocol URI
Protocol string `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
// Schema URI
Schema string `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"`
// Data CID
DataCid string `protobuf:"bytes,5,opt,name=data_cid,json=dataCid,proto3" json:"data_cid,omitempty"`
// Data size in bytes
DataSize uint64 `protobuf:"varint,6,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"`
// Whether data is encrypted
Encrypted bool `protobuf:"varint,7,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,8,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventRecordWritten) Reset() {
*x = EventRecordWritten{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventRecordWritten) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventRecordWritten) ProtoMessage() {}
// Deprecated: Use EventRecordWritten.ProtoReflect.Descriptor instead.
func (*EventRecordWritten) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{0}
}
func (x *EventRecordWritten) GetRecordId() string {
if x != nil {
return x.RecordId
}
return ""
}
func (x *EventRecordWritten) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *EventRecordWritten) GetProtocol() string {
if x != nil {
return x.Protocol
}
return ""
}
func (x *EventRecordWritten) GetSchema() string {
if x != nil {
return x.Schema
}
return ""
}
func (x *EventRecordWritten) GetDataCid() string {
if x != nil {
return x.DataCid
}
return ""
}
func (x *EventRecordWritten) GetDataSize() uint64 {
if x != nil {
return x.DataSize
}
return 0
}
func (x *EventRecordWritten) GetEncrypted() bool {
if x != nil {
return x.Encrypted
}
return false
}
func (x *EventRecordWritten) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventRecordDeleted is emitted when a record is deleted from DWN
type EventRecordDeleted struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Record ID
RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"`
// Target DID
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
// Deleter address
Deleter string `protobuf:"bytes,3,opt,name=deleter,proto3" json:"deleter,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventRecordDeleted) Reset() {
*x = EventRecordDeleted{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventRecordDeleted) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventRecordDeleted) ProtoMessage() {}
// Deprecated: Use EventRecordDeleted.ProtoReflect.Descriptor instead.
func (*EventRecordDeleted) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{1}
}
func (x *EventRecordDeleted) GetRecordId() string {
if x != nil {
return x.RecordId
}
return ""
}
func (x *EventRecordDeleted) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *EventRecordDeleted) GetDeleter() string {
if x != nil {
return x.Deleter
}
return ""
}
func (x *EventRecordDeleted) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventProtocolConfigured is emitted when a protocol is configured
type EventProtocolConfigured struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Target DID
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
// Protocol URI
ProtocolUri string `protobuf:"bytes,2,opt,name=protocol_uri,json=protocolUri,proto3" json:"protocol_uri,omitempty"`
// Whether protocol is published
Published bool `protobuf:"varint,3,opt,name=published,proto3" json:"published,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventProtocolConfigured) Reset() {
*x = EventProtocolConfigured{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventProtocolConfigured) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventProtocolConfigured) ProtoMessage() {}
// Deprecated: Use EventProtocolConfigured.ProtoReflect.Descriptor instead.
func (*EventProtocolConfigured) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{2}
}
func (x *EventProtocolConfigured) GetTarget() string {
if x != nil {
return x.Target
}
return ""
}
func (x *EventProtocolConfigured) GetProtocolUri() string {
if x != nil {
return x.ProtocolUri
}
return ""
}
func (x *EventProtocolConfigured) GetPublished() bool {
if x != nil {
return x.Published
}
return false
}
func (x *EventProtocolConfigured) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventPermissionGranted is emitted when a permission is granted
type EventPermissionGranted struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Permission ID
PermissionId string `protobuf:"bytes,1,opt,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"`
// Grantor DID
Grantor string `protobuf:"bytes,2,opt,name=grantor,proto3" json:"grantor,omitempty"`
// Grantee DID
Grantee string `protobuf:"bytes,3,opt,name=grantee,proto3" json:"grantee,omitempty"`
// Interface name
InterfaceName string `protobuf:"bytes,4,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
// Method name
Method string `protobuf:"bytes,5,opt,name=method,proto3" json:"method,omitempty"`
// Expiration timestamp
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,7,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventPermissionGranted) Reset() {
*x = EventPermissionGranted{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventPermissionGranted) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventPermissionGranted) ProtoMessage() {}
// Deprecated: Use EventPermissionGranted.ProtoReflect.Descriptor instead.
func (*EventPermissionGranted) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{3}
}
func (x *EventPermissionGranted) GetPermissionId() string {
if x != nil {
return x.PermissionId
}
return ""
}
func (x *EventPermissionGranted) GetGrantor() string {
if x != nil {
return x.Grantor
}
return ""
}
func (x *EventPermissionGranted) GetGrantee() string {
if x != nil {
return x.Grantee
}
return ""
}
func (x *EventPermissionGranted) GetInterfaceName() string {
if x != nil {
return x.InterfaceName
}
return ""
}
func (x *EventPermissionGranted) GetMethod() string {
if x != nil {
return x.Method
}
return ""
}
func (x *EventPermissionGranted) GetExpiresAt() *timestamppb.Timestamp {
if x != nil {
return x.ExpiresAt
}
return nil
}
func (x *EventPermissionGranted) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventPermissionRevoked is emitted when a permission is revoked
type EventPermissionRevoked struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Permission ID
PermissionId string `protobuf:"bytes,1,opt,name=permission_id,json=permissionId,proto3" json:"permission_id,omitempty"`
// Revoker DID
Revoker string `protobuf:"bytes,2,opt,name=revoker,proto3" json:"revoker,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventPermissionRevoked) Reset() {
*x = EventPermissionRevoked{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventPermissionRevoked) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventPermissionRevoked) ProtoMessage() {}
// Deprecated: Use EventPermissionRevoked.ProtoReflect.Descriptor instead.
func (*EventPermissionRevoked) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{4}
}
func (x *EventPermissionRevoked) GetPermissionId() string {
if x != nil {
return x.PermissionId
}
return ""
}
func (x *EventPermissionRevoked) GetRevoker() string {
if x != nil {
return x.Revoker
}
return ""
}
func (x *EventPermissionRevoked) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventVaultCreated is emitted when a vault is created
type EventVaultCreated struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Vault ID
VaultId string `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"`
// Owner DID
Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
// Vault public key
PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventVaultCreated) Reset() {
*x = EventVaultCreated{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventVaultCreated) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventVaultCreated) ProtoMessage() {}
// Deprecated: Use EventVaultCreated.ProtoReflect.Descriptor instead.
func (*EventVaultCreated) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{5}
}
func (x *EventVaultCreated) GetVaultId() string {
if x != nil {
return x.VaultId
}
return ""
}
func (x *EventVaultCreated) GetOwner() string {
if x != nil {
return x.Owner
}
return ""
}
func (x *EventVaultCreated) GetPublicKey() string {
if x != nil {
return x.PublicKey
}
return ""
}
func (x *EventVaultCreated) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventVaultKeysRotated is emitted when vault keys are rotated
type EventVaultKeysRotated struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Vault ID
VaultId string `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id,omitempty"`
// Owner DID
Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
// New public key
NewPublicKey string `protobuf:"bytes,3,opt,name=new_public_key,json=newPublicKey,proto3" json:"new_public_key,omitempty"`
// Rotation height
RotationHeight uint64 `protobuf:"varint,4,opt,name=rotation_height,json=rotationHeight,proto3" json:"rotation_height,omitempty"`
// Block height
BlockHeight uint64 `protobuf:"varint,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}
func (x *EventVaultKeysRotated) Reset() {
*x = EventVaultKeysRotated{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventVaultKeysRotated) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventVaultKeysRotated) ProtoMessage() {}
// Deprecated: Use EventVaultKeysRotated.ProtoReflect.Descriptor instead.
func (*EventVaultKeysRotated) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{6}
}
func (x *EventVaultKeysRotated) GetVaultId() string {
if x != nil {
return x.VaultId
}
return ""
}
func (x *EventVaultKeysRotated) GetOwner() string {
if x != nil {
return x.Owner
}
return ""
}
func (x *EventVaultKeysRotated) GetNewPublicKey() string {
if x != nil {
return x.NewPublicKey
}
return ""
}
func (x *EventVaultKeysRotated) GetRotationHeight() uint64 {
if x != nil {
return x.RotationHeight
}
return 0
}
func (x *EventVaultKeysRotated) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
// EventKeyRotation is emitted when encryption keys are rotated
type EventKeyRotation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Previous key version (0 if first rotation)
OldKeyVersion uint64 `protobuf:"varint,1,opt,name=old_key_version,json=oldKeyVersion,proto3" json:"old_key_version,omitempty"`
// New key version
NewKeyVersion uint64 `protobuf:"varint,2,opt,name=new_key_version,json=newKeyVersion,proto3" json:"new_key_version,omitempty"`
// Reason for rotation
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
// Block height when rotation occurred
BlockHeight uint64 `protobuf:"varint,4,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
// Whether running in single node mode
SingleNodeMode bool `protobuf:"varint,5,opt,name=single_node_mode,json=singleNodeMode,proto3" json:"single_node_mode,omitempty"`
// Number of validators at time of rotation
ValidatorCount uint32 `protobuf:"varint,6,opt,name=validator_count,json=validatorCount,proto3" json:"validator_count,omitempty"`
}
func (x *EventKeyRotation) Reset() {
*x = EventKeyRotation{}
if protoimpl.UnsafeEnabled {
mi := &file_dwn_v1_events_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EventKeyRotation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EventKeyRotation) ProtoMessage() {}
// Deprecated: Use EventKeyRotation.ProtoReflect.Descriptor instead.
func (*EventKeyRotation) Descriptor() ([]byte, []int) {
return file_dwn_v1_events_proto_rawDescGZIP(), []int{7}
}
func (x *EventKeyRotation) GetOldKeyVersion() uint64 {
if x != nil {
return x.OldKeyVersion
}
return 0
}
func (x *EventKeyRotation) GetNewKeyVersion() uint64 {
if x != nil {
return x.NewKeyVersion
}
return 0
}
func (x *EventKeyRotation) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *EventKeyRotation) GetBlockHeight() uint64 {
if x != nil {
return x.BlockHeight
}
return 0
}
func (x *EventKeyRotation) GetSingleNodeMode() bool {
if x != nil {
return x.SingleNodeMode
}
return false
}
func (x *EventKeyRotation) GetValidatorCount() uint32 {
if x != nil {
return x.ValidatorCount
}
return 0
}
var File_dwn_v1_events_proto protoreflect.FileDescriptor
var file_dwn_v1_events_proto_rawDesc = []byte{
0x0a, 0x13, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67,
0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65,
0x63, 0x6f, 0x72, 0x64, 0x57, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72,
0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67,
0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06,
0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x69, 0x64,
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x43, 0x69, 0x64, 0x12,
0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09,
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x86, 0x01,
0x0a, 0x12, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69,
0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x17, 0x45, 0x76, 0x65, 0x6e, 0x74,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x55, 0x72, 0x69, 0x12, 0x1c, 0x0a,
0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x98,
0x02, 0x0a, 0x16, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72,
0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0c, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18,
0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x61, 0x6e,
0x74, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x61, 0x6e, 0x74,
0x65, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74,
0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
0x64, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x65, 0x78, 0x70,
0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f,
0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c,
0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x7a, 0x0a, 0x16, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x76, 0x6f,
0x6b, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x72, 0x6d,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f,
0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b,
0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48,
0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x86, 0x01, 0x0a, 0x11, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x56,
0x61, 0x75, 0x6c, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x76,
0x61, 0x75, 0x6c, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,
0x61, 0x75, 0x6c, 0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a,
0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x62,
0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xba,
0x01, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x4b, 0x65, 0x79,
0x73, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x61, 0x75, 0x6c,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, 0x75, 0x6c,
0x74, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77,
0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12,
0x27, 0x0a, 0x0f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67,
0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b,
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xf0, 0x01, 0x0a, 0x10,
0x45, 0x76, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6c, 0x64, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6f, 0x6c, 0x64, 0x4b, 0x65,
0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x5f,
0x6b, 0x65, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x4b, 0x65, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63,
0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b,
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73,
0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x6f, 0x64,
0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x7c,
0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x45, 0x76,
0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2d, 0x69, 0x6f, 0x2f,
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x3b,
0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x77,
0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12,
0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_dwn_v1_events_proto_rawDescOnce sync.Once
file_dwn_v1_events_proto_rawDescData = file_dwn_v1_events_proto_rawDesc
)
func file_dwn_v1_events_proto_rawDescGZIP() []byte {
file_dwn_v1_events_proto_rawDescOnce.Do(func() {
file_dwn_v1_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_v1_events_proto_rawDescData)
})
return file_dwn_v1_events_proto_rawDescData
}
var file_dwn_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_dwn_v1_events_proto_goTypes = []interface{}{
(*EventRecordWritten)(nil), // 0: dwn.v1.EventRecordWritten
(*EventRecordDeleted)(nil), // 1: dwn.v1.EventRecordDeleted
(*EventProtocolConfigured)(nil), // 2: dwn.v1.EventProtocolConfigured
(*EventPermissionGranted)(nil), // 3: dwn.v1.EventPermissionGranted
(*EventPermissionRevoked)(nil), // 4: dwn.v1.EventPermissionRevoked
(*EventVaultCreated)(nil), // 5: dwn.v1.EventVaultCreated
(*EventVaultKeysRotated)(nil), // 6: dwn.v1.EventVaultKeysRotated
(*EventKeyRotation)(nil), // 7: dwn.v1.EventKeyRotation
(*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
}
var file_dwn_v1_events_proto_depIdxs = []int32{
8, // 0: dwn.v1.EventPermissionGranted.expires_at:type_name -> google.protobuf.Timestamp
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_dwn_v1_events_proto_init() }
func file_dwn_v1_events_proto_init() {
if File_dwn_v1_events_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_dwn_v1_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventRecordWritten); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventRecordDeleted); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventProtocolConfigured); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventPermissionGranted); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventPermissionRevoked); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventVaultCreated); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventVaultKeysRotated); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_dwn_v1_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EventKeyRotation); 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_dwn_v1_events_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_dwn_v1_events_proto_goTypes,
DependencyIndexes: file_dwn_v1_events_proto_depIdxs,
MessageInfos: file_dwn_v1_events_proto_msgTypes,
}.Build()
File_dwn_v1_events_proto = out.File
file_dwn_v1_events_proto_rawDesc = nil
file_dwn_v1_events_proto_goTypes = nil
file_dwn_v1_events_proto_depIdxs = nil
}