From aa4efb2a094161cd83f48594bdfeb4a5f0f0e5d3 Mon Sep 17 00:00:00 2001 From: Calum Murray Date: Fri, 12 Jul 2024 12:38:47 -0400 Subject: [PATCH 1/2] feat: added format to egress config Signed-off-by: Calum Murray --- control-plane/pkg/core/config/utils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/control-plane/pkg/core/config/utils.go b/control-plane/pkg/core/config/utils.go index 2a9d3a51bb..e3768c3b77 100644 --- a/control-plane/pkg/core/config/utils.go +++ b/control-plane/pkg/core/config/utils.go @@ -106,6 +106,10 @@ func EgressConfigFromDelivery( egressConfig.Timeout = timeout } + if delivery.Format != nil { + egressConfig.Format = string(*delivery.Format) + } + return egressConfig, nil } @@ -191,6 +195,7 @@ func MergeEgressConfig(e0, e1 *contract.EgressConfig) *contract.EgressConfig { BackoffPolicy: e0.GetBackoffPolicy(), BackoffDelay: mergeUint64(e0.GetBackoffDelay(), e1.GetBackoffDelay()), Timeout: mergeUint64(e0.GetTimeout(), e1.GetTimeout()), + Format: mergeString(e0.GetFormat(), e1.GetFormat()), } } From 6d2d475b325558c986c5b1478a1ffc4e9fc1a482 Mon Sep 17 00:00:00 2001 From: Calum Murray Date: Wed, 17 Jul 2024 13:12:43 -0400 Subject: [PATCH 2/2] feat: add data plane dispatcher changes too Signed-off-by: Calum Murray --- control-plane/pkg/contract/contract.pb.go | 632 ++++++++++-------- control-plane/pkg/core/config/utils.go | 14 +- .../broker/contract/DataPlaneContract.java | 417 +++++++----- .../impl/http/WebClientCloudEventSender.java | 12 +- proto/contract.proto | 11 +- 5 files changed, 634 insertions(+), 452 deletions(-) diff --git a/control-plane/pkg/contract/contract.pb.go b/control-plane/pkg/contract/contract.pb.go index c319671526..23ea88bceb 100644 --- a/control-plane/pkg/contract/contract.pb.go +++ b/control-plane/pkg/contract/contract.pb.go @@ -69,6 +69,55 @@ func (BackoffPolicy) EnumDescriptor() ([]byte, []int) { return file_contract_proto_rawDescGZIP(), []int{0} } +// DeliveryFormat is the format used to send events +type DeliveryFormat int32 + +const ( + // Binary event format + DeliveryFormat_Binary DeliveryFormat = 0 + // JSON structured event format + DeliveryFormat_JSON DeliveryFormat = 1 +) + +// Enum value maps for DeliveryFormat. +var ( + DeliveryFormat_name = map[int32]string{ + 0: "Binary", + 1: "JSON", + } + DeliveryFormat_value = map[string]int32{ + "Binary": 0, + "JSON": 1, + } +) + +func (x DeliveryFormat) Enum() *DeliveryFormat { + p := new(DeliveryFormat) + *p = x + return p +} + +func (x DeliveryFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeliveryFormat) Descriptor() protoreflect.EnumDescriptor { + return file_contract_proto_enumTypes[1].Descriptor() +} + +func (DeliveryFormat) Type() protoreflect.EnumType { + return &file_contract_proto_enumTypes[1] +} + +func (x DeliveryFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeliveryFormat.Descriptor instead. +func (DeliveryFormat) EnumDescriptor() ([]byte, []int) { + return file_contract_proto_rawDescGZIP(), []int{1} +} + // Check dev.knative.eventing.kafka.broker.dispatcher.consumer.DeliveryOrder for more details type DeliveryOrder int32 @@ -100,11 +149,11 @@ func (x DeliveryOrder) String() string { } func (DeliveryOrder) Descriptor() protoreflect.EnumDescriptor { - return file_contract_proto_enumTypes[1].Descriptor() + return file_contract_proto_enumTypes[2].Descriptor() } func (DeliveryOrder) Type() protoreflect.EnumType { - return &file_contract_proto_enumTypes[1] + return &file_contract_proto_enumTypes[2] } func (x DeliveryOrder) Number() protoreflect.EnumNumber { @@ -113,7 +162,7 @@ func (x DeliveryOrder) Number() protoreflect.EnumNumber { // Deprecated: Use DeliveryOrder.Descriptor instead. func (DeliveryOrder) EnumDescriptor() ([]byte, []int) { - return file_contract_proto_rawDescGZIP(), []int{1} + return file_contract_proto_rawDescGZIP(), []int{2} } type KeyType int32 @@ -152,11 +201,11 @@ func (x KeyType) String() string { } func (KeyType) Descriptor() protoreflect.EnumDescriptor { - return file_contract_proto_enumTypes[2].Descriptor() + return file_contract_proto_enumTypes[3].Descriptor() } func (KeyType) Type() protoreflect.EnumType { - return &file_contract_proto_enumTypes[2] + return &file_contract_proto_enumTypes[3] } func (x KeyType) Number() protoreflect.EnumNumber { @@ -165,7 +214,7 @@ func (x KeyType) Number() protoreflect.EnumNumber { // Deprecated: Use KeyType.Descriptor instead. func (KeyType) EnumDescriptor() ([]byte, []int) { - return file_contract_proto_rawDescGZIP(), []int{2} + return file_contract_proto_rawDescGZIP(), []int{3} } // CloudEvent content mode @@ -199,11 +248,11 @@ func (x ContentMode) String() string { } func (ContentMode) Descriptor() protoreflect.EnumDescriptor { - return file_contract_proto_enumTypes[3].Descriptor() + return file_contract_proto_enumTypes[4].Descriptor() } func (ContentMode) Type() protoreflect.EnumType { - return &file_contract_proto_enumTypes[3] + return &file_contract_proto_enumTypes[4] } func (x ContentMode) Number() protoreflect.EnumNumber { @@ -212,7 +261,7 @@ func (x ContentMode) Number() protoreflect.EnumNumber { // Deprecated: Use ContentMode.Descriptor instead. func (ContentMode) EnumDescriptor() ([]byte, []int) { - return file_contract_proto_rawDescGZIP(), []int{3} + return file_contract_proto_rawDescGZIP(), []int{4} } type SecretField int32 @@ -257,11 +306,11 @@ func (x SecretField) String() string { } func (SecretField) Descriptor() protoreflect.EnumDescriptor { - return file_contract_proto_enumTypes[4].Descriptor() + return file_contract_proto_enumTypes[5].Descriptor() } func (SecretField) Type() protoreflect.EnumType { - return &file_contract_proto_enumTypes[4] + return &file_contract_proto_enumTypes[5] } func (x SecretField) Number() protoreflect.EnumNumber { @@ -270,7 +319,7 @@ func (x SecretField) Number() protoreflect.EnumNumber { // Deprecated: Use SecretField.Descriptor instead. func (SecretField) EnumDescriptor() ([]byte, []int) { - return file_contract_proto_rawDescGZIP(), []int{4} + return file_contract_proto_rawDescGZIP(), []int{5} } type Protocol int32 @@ -309,11 +358,11 @@ func (x Protocol) String() string { } func (Protocol) Descriptor() protoreflect.EnumDescriptor { - return file_contract_proto_enumTypes[5].Descriptor() + return file_contract_proto_enumTypes[6].Descriptor() } func (Protocol) Type() protoreflect.EnumType { - return &file_contract_proto_enumTypes[5] + return &file_contract_proto_enumTypes[6] } func (x Protocol) Number() protoreflect.EnumNumber { @@ -322,7 +371,7 @@ func (x Protocol) Number() protoreflect.EnumNumber { // Deprecated: Use Protocol.Descriptor instead. func (Protocol) EnumDescriptor() ([]byte, []int) { - return file_contract_proto_rawDescGZIP(), []int{5} + return file_contract_proto_rawDescGZIP(), []int{6} } // We don't use the google.protobuf.Empty type because @@ -913,7 +962,7 @@ type EgressConfig struct { // Dead Letter Audience is the OIDC audience of the dead letter DeadLetterAudience string `protobuf:"bytes,7,opt,name=deadLetterAudience,proto3" json:"deadLetterAudience,omitempty"` // format is the format used to deliver the event. Can be one of "json" or "binary" - Format string `protobuf:"bytes,8,opt,name=format,proto3" json:"format,omitempty"` + Format DeliveryFormat `protobuf:"varint,8,opt,name=format,proto3,enum=DeliveryFormat" json:"format,omitempty"` // retry is the minimum number of retries the sender should attempt when // sending an event before moving it to the dead letter sink. // @@ -980,11 +1029,11 @@ func (x *EgressConfig) GetDeadLetterAudience() string { return "" } -func (x *EgressConfig) GetFormat() string { +func (x *EgressConfig) GetFormat() DeliveryFormat { if x != nil { return x.Format } - return "" + return DeliveryFormat_Binary } func (x *EgressConfig) GetRetry() uint32 { @@ -2066,7 +2115,7 @@ var file_contract_proto_rawDesc = []byte{ 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xae, 0x02, 0x0a, 0x0c, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbf, 0x02, 0x0a, 0x0c, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, @@ -2075,200 +2124,203 @@ var file_contract_proto_rawDesc = []byte{ 0x72, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x61, 0x64, 0x4c, 0x65, 0x74, 0x74, 0x65, 0x72, 0x41, 0x75, 0x64, 0x69, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, - 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, - 0x79, 0x12, 0x34, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x6f, - 0x66, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, - 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x6f, - 0x66, 0x66, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x62, - 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xd8, 0x06, 0x0a, 0x06, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, - 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x72, 0x65, - 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, - 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6c, - 0x79, 0x54, 0x6f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x70, 0x69, 0x63, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, - 0x52, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, - 0x6c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, - 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, - 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, - 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x2a, - 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, - 0x72, 0x6c, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x31, 0x0a, - 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, + 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x12, 0x34, 0x0a, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x42, 0x61, 0x63, 0x6b, + 0x6f, 0x66, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x6f, + 0x66, 0x66, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, + 0x6f, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xd8, 0x06, 0x0a, 0x06, 0x45, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x08, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x12, 0x3c, 0x0a, 0x14, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x54, 0x6f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x70, 0x69, + 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, + 0x00, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x6c, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x2c, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x61, + 0x72, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, + 0x6c, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x43, 0x41, 0x43, 0x65, 0x72, 0x74, 0x73, 0x12, + 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x55, 0x72, 0x6c, 0x41, 0x75, 0x64, 0x69, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6c, 0x79, + 0x55, 0x72, 0x6c, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x06, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x31, + 0x0a, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x34, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, + 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, + 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x44, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, + 0x37, 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x6f, 0x69, 0x64, 0x63, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6f, 0x69, 0x64, 0x63, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x42, 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x1c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x07, 0x49, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, + 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x3e, + 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x09, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x0c, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x0a, + 0x12, 0x6b, 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x4b, 0x65, 0x79, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x6b, + 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x22, 0x55, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4d, 0x75, 0x6c, 0x74, + 0x69, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x25, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x30, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x13, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf1, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x2a, 0x0a, + 0x10, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x07, 0x69, 0x6e, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x49, 0x6e, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, + 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x34, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, - 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, - 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x44, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x12, 0x37, - 0x0a, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x0c, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x16, 0x6f, 0x69, 0x64, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6f, 0x69, 0x64, 0x63, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, - 0x0f, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, - 0x22, 0x86, 0x01, 0x0a, 0x12, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x1c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x07, 0x49, 0x6e, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x3e, 0x0a, - 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x09, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x0a, 0x12, - 0x6b, 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x4b, 0x65, 0x79, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x6b, 0x65, - 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x22, 0x55, 0x0a, 0x11, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, - 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x4b, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x25, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x30, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x13, 0x43, 0x6c, 0x6f, - 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x12, 0x44, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf1, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x2a, 0x0a, 0x10, - 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, - 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x07, 0x69, 0x6e, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x49, 0x6e, 0x67, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x07, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, 0x0c, - 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x0c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x23, 0x0a, 0x08, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x07, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x08, 0x65, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0a, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x75, - 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x48, 0x00, 0x52, 0x0a, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x12, 0x2c, - 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x41, 0x0a, 0x0f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, - 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, - 0x46, 0x0a, 0x13, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x43, - 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x73, 0x52, 0x13, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, - 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x42, 0x06, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x22, 0x77, 0x0a, 0x08, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, - 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, - 0x65, 0x73, 0x2a, 0x2c, 0x0a, 0x0d, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x10, 0x01, - 0x2a, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x3d, 0x0a, - 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0d, 0x0a, - 0x09, 0x42, 0x79, 0x74, 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x10, 0x03, 0x2a, 0x29, 0x0a, 0x0b, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, - 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x52, 0x55, 0x43, - 0x54, 0x55, 0x52, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x61, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x41, 0x53, 0x4c, 0x5f, 0x4d, - 0x45, 0x43, 0x48, 0x41, 0x4e, 0x49, 0x53, 0x4d, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, - 0x5f, 0x43, 0x52, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, - 0x52, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4b, 0x45, 0x59, - 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, - 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x05, 0x2a, 0x44, 0x0a, 0x08, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x54, - 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x41, 0x53, 0x4c, 0x5f, 0x50, 0x4c, - 0x41, 0x49, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x4c, - 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x41, 0x53, 0x4c, 0x5f, 0x53, 0x53, 0x4c, 0x10, 0x03, - 0x42, 0x5b, 0x0a, 0x2a, 0x64, 0x65, 0x76, 0x2e, 0x6b, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2e, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x2e, 0x62, - 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x11, - 0x44, 0x61, 0x74, 0x61, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x5a, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x23, 0x0a, 0x08, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x08, 0x65, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0a, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x41, + 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x2c, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, + 0x00, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x41, 0x0a, + 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x46, 0x0a, 0x13, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x52, 0x13, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x22, 0x77, 0x0a, 0x08, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, + 0x6c, 0x65, 0x73, 0x2a, 0x2c, 0x0a, 0x0d, 0x42, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x10, + 0x01, 0x2a, 0x26, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x0d, 0x44, 0x65, 0x6c, + 0x69, 0x76, 0x65, 0x72, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x52, 0x44, + 0x45, 0x52, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x3d, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x79, 0x74, 0x65, 0x41, 0x72, + 0x72, 0x61, 0x79, 0x10, 0x03, 0x2a, 0x29, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, 0x52, 0x45, 0x44, 0x10, 0x01, + 0x2a, 0x61, 0x0a, 0x0b, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x41, 0x53, 0x4c, 0x5f, 0x4d, 0x45, 0x43, 0x48, 0x41, 0x4e, 0x49, 0x53, + 0x4d, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, 0x5f, 0x43, 0x52, 0x54, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, 0x52, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, + 0x08, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, + 0x53, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, + 0x44, 0x10, 0x05, 0x2a, 0x44, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x0d, 0x0a, 0x09, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x00, 0x12, 0x12, + 0x0a, 0x0e, 0x53, 0x41, 0x53, 0x4c, 0x5f, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x58, 0x54, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, + 0x41, 0x53, 0x4c, 0x5f, 0x53, 0x53, 0x4c, 0x10, 0x03, 0x42, 0x5b, 0x0a, 0x2a, 0x64, 0x65, 0x76, + 0x2e, 0x6b, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x6b, 0x61, 0x66, 0x6b, 0x61, 0x2e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x11, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6c, 0x61, + 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5a, 0x1a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2283,88 +2335,90 @@ func file_contract_proto_rawDescGZIP() []byte { return file_contract_proto_rawDescData } -var file_contract_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_contract_proto_enumTypes = make([]protoimpl.EnumInfo, 7) var file_contract_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_contract_proto_goTypes = []interface{}{ (BackoffPolicy)(0), // 0: BackoffPolicy - (DeliveryOrder)(0), // 1: DeliveryOrder - (KeyType)(0), // 2: KeyType - (ContentMode)(0), // 3: ContentMode - (SecretField)(0), // 4: SecretField - (Protocol)(0), // 5: Protocol - (*Empty)(nil), // 6: Empty - (*Exact)(nil), // 7: Exact - (*Prefix)(nil), // 8: Prefix - (*Suffix)(nil), // 9: Suffix - (*All)(nil), // 10: All - (*Any)(nil), // 11: Any - (*Not)(nil), // 12: Not - (*CESQL)(nil), // 13: CESQL - (*DialectedFilter)(nil), // 14: DialectedFilter - (*Filter)(nil), // 15: Filter - (*EgressConfig)(nil), // 16: EgressConfig - (*Egress)(nil), // 17: Egress - (*EgressFeatureFlags)(nil), // 18: EgressFeatureFlags - (*Ingress)(nil), // 19: Ingress - (*Reference)(nil), // 20: Reference - (*SecretReference)(nil), // 21: SecretReference - (*KeyFieldReference)(nil), // 22: KeyFieldReference - (*MultiSecretReference)(nil), // 23: MultiSecretReference - (*CloudEventOverrides)(nil), // 24: CloudEventOverrides - (*Resource)(nil), // 25: Resource - (*Contract)(nil), // 26: Contract - nil, // 27: Exact.AttributesEntry - nil, // 28: Prefix.AttributesEntry - nil, // 29: Suffix.AttributesEntry - nil, // 30: Filter.AttributesEntry - nil, // 31: CloudEventOverrides.ExtensionsEntry + (DeliveryFormat)(0), // 1: DeliveryFormat + (DeliveryOrder)(0), // 2: DeliveryOrder + (KeyType)(0), // 3: KeyType + (ContentMode)(0), // 4: ContentMode + (SecretField)(0), // 5: SecretField + (Protocol)(0), // 6: Protocol + (*Empty)(nil), // 7: Empty + (*Exact)(nil), // 8: Exact + (*Prefix)(nil), // 9: Prefix + (*Suffix)(nil), // 10: Suffix + (*All)(nil), // 11: All + (*Any)(nil), // 12: Any + (*Not)(nil), // 13: Not + (*CESQL)(nil), // 14: CESQL + (*DialectedFilter)(nil), // 15: DialectedFilter + (*Filter)(nil), // 16: Filter + (*EgressConfig)(nil), // 17: EgressConfig + (*Egress)(nil), // 18: Egress + (*EgressFeatureFlags)(nil), // 19: EgressFeatureFlags + (*Ingress)(nil), // 20: Ingress + (*Reference)(nil), // 21: Reference + (*SecretReference)(nil), // 22: SecretReference + (*KeyFieldReference)(nil), // 23: KeyFieldReference + (*MultiSecretReference)(nil), // 24: MultiSecretReference + (*CloudEventOverrides)(nil), // 25: CloudEventOverrides + (*Resource)(nil), // 26: Resource + (*Contract)(nil), // 27: Contract + nil, // 28: Exact.AttributesEntry + nil, // 29: Prefix.AttributesEntry + nil, // 30: Suffix.AttributesEntry + nil, // 31: Filter.AttributesEntry + nil, // 32: CloudEventOverrides.ExtensionsEntry } var file_contract_proto_depIdxs = []int32{ - 27, // 0: Exact.attributes:type_name -> Exact.AttributesEntry - 28, // 1: Prefix.attributes:type_name -> Prefix.AttributesEntry - 29, // 2: Suffix.attributes:type_name -> Suffix.AttributesEntry - 14, // 3: All.filters:type_name -> DialectedFilter - 14, // 4: Any.filters:type_name -> DialectedFilter - 14, // 5: Not.filter:type_name -> DialectedFilter - 7, // 6: DialectedFilter.exact:type_name -> Exact - 8, // 7: DialectedFilter.prefix:type_name -> Prefix - 9, // 8: DialectedFilter.suffix:type_name -> Suffix - 10, // 9: DialectedFilter.all:type_name -> All - 11, // 10: DialectedFilter.any:type_name -> Any - 12, // 11: DialectedFilter.not:type_name -> Not - 13, // 12: DialectedFilter.cesql:type_name -> CESQL - 30, // 13: Filter.attributes:type_name -> Filter.AttributesEntry - 0, // 14: EgressConfig.backoffPolicy:type_name -> BackoffPolicy - 6, // 15: Egress.replyToOriginalTopic:type_name -> Empty - 6, // 16: Egress.discardReply:type_name -> Empty - 15, // 17: Egress.filter:type_name -> Filter - 16, // 18: Egress.egressConfig:type_name -> EgressConfig - 1, // 19: Egress.deliveryOrder:type_name -> DeliveryOrder - 2, // 20: Egress.keyType:type_name -> KeyType - 20, // 21: Egress.reference:type_name -> Reference - 14, // 22: Egress.dialectedFilter:type_name -> DialectedFilter - 18, // 23: Egress.featureFlags:type_name -> EgressFeatureFlags - 3, // 24: Ingress.contentMode:type_name -> ContentMode - 20, // 25: SecretReference.reference:type_name -> Reference - 22, // 26: SecretReference.keyFieldReferences:type_name -> KeyFieldReference - 4, // 27: KeyFieldReference.field:type_name -> SecretField - 5, // 28: MultiSecretReference.protocol:type_name -> Protocol - 21, // 29: MultiSecretReference.references:type_name -> SecretReference - 31, // 30: CloudEventOverrides.extensions:type_name -> CloudEventOverrides.ExtensionsEntry - 19, // 31: Resource.ingress:type_name -> Ingress - 16, // 32: Resource.egressConfig:type_name -> EgressConfig - 17, // 33: Resource.egresses:type_name -> Egress - 6, // 34: Resource.absentAuth:type_name -> Empty - 20, // 35: Resource.authSecret:type_name -> Reference - 23, // 36: Resource.multiAuthSecret:type_name -> MultiSecretReference - 24, // 37: Resource.cloudEventOverrides:type_name -> CloudEventOverrides - 20, // 38: Resource.reference:type_name -> Reference - 25, // 39: Contract.resources:type_name -> Resource - 40, // [40:40] is the sub-list for method output_type - 40, // [40:40] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 28, // 0: Exact.attributes:type_name -> Exact.AttributesEntry + 29, // 1: Prefix.attributes:type_name -> Prefix.AttributesEntry + 30, // 2: Suffix.attributes:type_name -> Suffix.AttributesEntry + 15, // 3: All.filters:type_name -> DialectedFilter + 15, // 4: Any.filters:type_name -> DialectedFilter + 15, // 5: Not.filter:type_name -> DialectedFilter + 8, // 6: DialectedFilter.exact:type_name -> Exact + 9, // 7: DialectedFilter.prefix:type_name -> Prefix + 10, // 8: DialectedFilter.suffix:type_name -> Suffix + 11, // 9: DialectedFilter.all:type_name -> All + 12, // 10: DialectedFilter.any:type_name -> Any + 13, // 11: DialectedFilter.not:type_name -> Not + 14, // 12: DialectedFilter.cesql:type_name -> CESQL + 31, // 13: Filter.attributes:type_name -> Filter.AttributesEntry + 1, // 14: EgressConfig.format:type_name -> DeliveryFormat + 0, // 15: EgressConfig.backoffPolicy:type_name -> BackoffPolicy + 7, // 16: Egress.replyToOriginalTopic:type_name -> Empty + 7, // 17: Egress.discardReply:type_name -> Empty + 16, // 18: Egress.filter:type_name -> Filter + 17, // 19: Egress.egressConfig:type_name -> EgressConfig + 2, // 20: Egress.deliveryOrder:type_name -> DeliveryOrder + 3, // 21: Egress.keyType:type_name -> KeyType + 21, // 22: Egress.reference:type_name -> Reference + 15, // 23: Egress.dialectedFilter:type_name -> DialectedFilter + 19, // 24: Egress.featureFlags:type_name -> EgressFeatureFlags + 4, // 25: Ingress.contentMode:type_name -> ContentMode + 21, // 26: SecretReference.reference:type_name -> Reference + 23, // 27: SecretReference.keyFieldReferences:type_name -> KeyFieldReference + 5, // 28: KeyFieldReference.field:type_name -> SecretField + 6, // 29: MultiSecretReference.protocol:type_name -> Protocol + 22, // 30: MultiSecretReference.references:type_name -> SecretReference + 32, // 31: CloudEventOverrides.extensions:type_name -> CloudEventOverrides.ExtensionsEntry + 20, // 32: Resource.ingress:type_name -> Ingress + 17, // 33: Resource.egressConfig:type_name -> EgressConfig + 18, // 34: Resource.egresses:type_name -> Egress + 7, // 35: Resource.absentAuth:type_name -> Empty + 21, // 36: Resource.authSecret:type_name -> Reference + 24, // 37: Resource.multiAuthSecret:type_name -> MultiSecretReference + 25, // 38: Resource.cloudEventOverrides:type_name -> CloudEventOverrides + 21, // 39: Resource.reference:type_name -> Reference + 26, // 40: Contract.resources:type_name -> Resource + 41, // [41:41] is the sub-list for method output_type + 41, // [41:41] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name } func init() { file_contract_proto_init() } @@ -2650,7 +2704,7 @@ func file_contract_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_contract_proto_rawDesc, - NumEnums: 6, + NumEnums: 7, NumMessages: 26, NumExtensions: 0, NumServices: 0, diff --git a/control-plane/pkg/core/config/utils.go b/control-plane/pkg/core/config/utils.go index e3768c3b77..4fe2cfd481 100644 --- a/control-plane/pkg/core/config/utils.go +++ b/control-plane/pkg/core/config/utils.go @@ -20,15 +20,14 @@ import ( "context" "crypto/x509" "fmt" - "math" - "sort" - "github.com/rickb777/date/period" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1listers "k8s.io/client-go/listers/core/v1" duck "knative.dev/eventing/pkg/apis/duck/v1" "knative.dev/eventing/pkg/eventingtls" "knative.dev/pkg/resolver" + "math" + "sort" "knative.dev/eventing-kafka-broker/control-plane/pkg/contract" @@ -107,7 +106,12 @@ func EgressConfigFromDelivery( } if delivery.Format != nil { - egressConfig.Format = string(*delivery.Format) + switch *delivery.Format { + case duck.DeliveryFormatBinary: + egressConfig.Format = contract.DeliveryFormat_Binary + case duck.DeliveryFormatJson: + egressConfig.Format = contract.DeliveryFormat_JSON + } } return egressConfig, nil @@ -195,7 +199,7 @@ func MergeEgressConfig(e0, e1 *contract.EgressConfig) *contract.EgressConfig { BackoffPolicy: e0.GetBackoffPolicy(), BackoffDelay: mergeUint64(e0.GetBackoffDelay(), e1.GetBackoffDelay()), Timeout: mergeUint64(e0.GetTimeout(), e1.GetTimeout()), - Format: mergeString(e0.GetFormat(), e1.GetFormat()), + Format: e0.GetFormat(), } } diff --git a/data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java b/data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java index 3fd2400191..ec5ea19486 100644 --- a/data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java +++ b/data-plane/contract/src/main/java/dev/knative/eventing/kafka/broker/contract/DataPlaneContract.java @@ -136,6 +136,131 @@ private BackoffPolicy(int value) { // @@protoc_insertion_point(enum_scope:BackoffPolicy) } + /** + *
+     * DeliveryFormat is the format used to send events
+     * 
+ * + * Protobuf enum {@code DeliveryFormat} + */ + public enum DeliveryFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+         * Binary event format
+         * 
+ * + * Binary = 0; + */ + Binary(0), + /** + *
+         * JSON structured event format
+         * 
+ * + * JSON = 1; + */ + JSON(1), + UNRECOGNIZED(-1), + ; + + /** + *
+         * Binary event format
+         * 
+ * + * Binary = 0; + */ + public static final int Binary_VALUE = 0; + /** + *
+         * JSON structured event format
+         * 
+ * + * JSON = 1; + */ + public static final int JSON_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeliveryFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DeliveryFormat forNumber(int value) { + switch (value) { + case 0: + return Binary; + case 1: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeliveryFormat findValueByNumber(int number) { + return DeliveryFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException("Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final DeliveryFormat[] VALUES = values(); + + public static DeliveryFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DeliveryFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:DeliveryFormat) + } + /** *
      * Check dev.knative.eventing.kafka.broker.dispatcher.consumer.DeliveryOrder for more details
@@ -221,7 +346,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType
         public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
             return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor()
                     .getEnumTypes()
-                    .get(1);
+                    .get(2);
         }
 
         private static final DeliveryOrder[] VALUES = values();
@@ -346,7 +471,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType
         public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
             return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor()
                     .getEnumTypes()
-                    .get(2);
+                    .get(3);
         }
 
         private static final KeyType[] VALUES = values();
@@ -455,7 +580,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType
         public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
             return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor()
                     .getEnumTypes()
-                    .get(3);
+                    .get(4);
         }
 
         private static final ContentMode[] VALUES = values();
@@ -600,7 +725,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType
         public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
             return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor()
                     .getEnumTypes()
-                    .get(4);
+                    .get(5);
         }
 
         private static final SecretField[] VALUES = values();
@@ -725,7 +850,7 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType
         public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
             return dev.knative.eventing.kafka.broker.contract.DataPlaneContract.getDescriptor()
                     .getEnumTypes()
-                    .get(5);
+                    .get(6);
         }
 
         private static final Protocol[] VALUES = values();
@@ -9273,19 +9398,19 @@ public interface EgressConfigOrBuilder
          * format is the format used to deliver the event. Can be one of "json" or "binary"
          * 
* - * string format = 8; - * @return The format. + * .DeliveryFormat format = 8; + * @return The enum numeric value on the wire for format. */ - java.lang.String getFormat(); + int getFormatValue(); /** *
          * format is the format used to deliver the event. Can be one of "json" or "binary"
          * 
* - * string format = 8; - * @return The bytes for format. + * .DeliveryFormat format = 8; + * @return The format. */ - com.google.protobuf.ByteString getFormatBytes(); + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat getFormat(); /** *
@@ -9355,7 +9480,7 @@ private EgressConfig() {
             deadLetter_ = "";
             deadLetterCACerts_ = "";
             deadLetterAudience_ = "";
-            format_ = "";
+            format_ = 0;
             backoffPolicy_ = 0;
         }
 
@@ -9423,10 +9548,10 @@ private EgressConfig(
                             deadLetterAudience_ = s;
                             break;
                         }
-                        case 66: {
-                            java.lang.String s = input.readStringRequireUtf8();
+                        case 64: {
+                            int rawValue = input.readEnum();
 
-                            format_ = s;
+                            format_ = rawValue;
                             break;
                         }
                         default: {
@@ -9587,45 +9712,35 @@ public com.google.protobuf.ByteString getDeadLetterAudienceBytes() {
         }
 
         public static final int FORMAT_FIELD_NUMBER = 8;
-        private volatile java.lang.Object format_;
+        private int format_;
         /**
          * 
          * format is the format used to deliver the event. Can be one of "json" or "binary"
          * 
* - * string format = 8; - * @return The format. + * .DeliveryFormat format = 8; + * @return The enum numeric value on the wire for format. */ @java.lang.Override - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } + public int getFormatValue() { + return format_; } /** *
          * format is the format used to deliver the event. Can be one of "json" or "binary"
          * 
* - * string format = 8; - * @return The bytes for format. + * .DeliveryFormat format = 8; + * @return The format. */ @java.lang.Override - public com.google.protobuf.ByteString getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat getFormat() { + @SuppressWarnings("deprecation") + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat result = + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.valueOf(format_); + return result == null + ? dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.UNRECOGNIZED + : result; } public static final int RETRY_FIELD_NUMBER = 2; @@ -9744,8 +9859,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getDeadLetterAudienceBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, deadLetterAudience_); } - if (!getFormatBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, format_); + if (format_ + != dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.Binary.getNumber()) { + output.writeEnum(8, format_); } unknownFields.writeTo(output); } @@ -9779,8 +9895,9 @@ public int getSerializedSize() { if (!getDeadLetterAudienceBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, deadLetterAudience_); } - if (!getFormatBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, format_); + if (format_ + != dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.Binary.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, format_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -9801,7 +9918,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeadLetter().equals(other.getDeadLetter())) return false; if (!getDeadLetterCACerts().equals(other.getDeadLetterCACerts())) return false; if (!getDeadLetterAudience().equals(other.getDeadLetterAudience())) return false; - if (!getFormat().equals(other.getFormat())) return false; + if (format_ != other.format_) return false; if (getRetry() != other.getRetry()) return false; if (backoffPolicy_ != other.backoffPolicy_) return false; if (getBackoffDelay() != other.getBackoffDelay()) return false; @@ -9824,7 +9941,7 @@ public int hashCode() { hash = (37 * hash) + DEADLETTERAUDIENCE_FIELD_NUMBER; hash = (53 * hash) + getDeadLetterAudience().hashCode(); hash = (37 * hash) + FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getFormat().hashCode(); + hash = (53 * hash) + format_; hash = (37 * hash) + RETRY_FIELD_NUMBER; hash = (53 * hash) + getRetry(); hash = (37 * hash) + BACKOFFPOLICY_FIELD_NUMBER; @@ -9974,7 +10091,7 @@ public Builder clear() { deadLetterAudience_ = ""; - format_ = ""; + format_ = 0; retry_ = 0; @@ -10082,9 +10199,8 @@ public Builder mergeFrom(dev.knative.eventing.kafka.broker.contract.DataPlaneCon deadLetterAudience_ = other.deadLetterAudience_; onChanged(); } - if (!other.getFormat().isEmpty()) { - format_ = other.format_; - onChanged(); + if (other.format_ != 0) { + setFormatValue(other.getFormatValue()); } if (other.getRetry() != 0) { setRetry(other.getRetry()); @@ -10401,74 +10517,67 @@ public Builder setDeadLetterAudienceBytes(com.google.protobuf.ByteString value) return this; } - private java.lang.Object format_ = ""; + private int format_ = 0; /** *
              * format is the format used to deliver the event. Can be one of "json" or "binary"
              * 
* - * string format = 8; - * @return The format. + * .DeliveryFormat format = 8; + * @return The enum numeric value on the wire for format. */ - public java.lang.String getFormat() { - java.lang.Object ref = format_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - format_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public int getFormatValue() { + return format_; } /** *
              * format is the format used to deliver the event. Can be one of "json" or "binary"
              * 
* - * string format = 8; - * @return The bytes for format. + * .DeliveryFormat format = 8; + * @param value The enum numeric value on the wire for format to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getFormatBytes() { - java.lang.Object ref = format_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - format_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setFormatValue(int value) { + + format_ = value; + onChanged(); + return this; } /** *
              * format is the format used to deliver the event. Can be one of "json" or "binary"
              * 
* - * string format = 8; - * @param value The format to set. - * @return This builder for chaining. + * .DeliveryFormat format = 8; + * @return The format. */ - public Builder setFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - format_ = value; - onChanged(); - return this; + @java.lang.Override + public dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat getFormat() { + @SuppressWarnings("deprecation") + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat result = + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.valueOf(format_); + return result == null + ? dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat.UNRECOGNIZED + : result; } /** *
              * format is the format used to deliver the event. Can be one of "json" or "binary"
              * 
* - * string format = 8; + * .DeliveryFormat format = 8; + * @param value The format to set. * @return This builder for chaining. */ - public Builder clearFormat() { + public Builder setFormat( + dev.knative.eventing.kafka.broker.contract.DataPlaneContract.DeliveryFormat value) { + if (value == null) { + throw new NullPointerException(); + } - format_ = getDefaultInstance().getFormat(); + format_ = value.getNumber(); onChanged(); return this; } @@ -10477,17 +10586,12 @@ public Builder clearFormat() { * format is the format used to deliver the event. Can be one of "json" or "binary" *
* - * string format = 8; - * @param value The bytes for format to set. + * .DeliveryFormat format = 8; * @return This builder for chaining. */ - public Builder setFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + public Builder clearFormat() { - format_ = value; + format_ = 0; onChanged(); return this; } @@ -28224,68 +28328,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "not\030\006 \001(\0132\004.NotH\000\022\027\n\005cesql\030\007 \001(\0132\006.CESQL" + "H\000B\010\n\006filter\"h\n\006Filter\022+\n\nattributes\030\001 \003" + "(\0132\027.Filter.AttributesEntry\0321\n\017Attribute" - + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\306" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\327" + "\001\n\014EgressConfig\022\022\n\ndeadLetter\030\001 \001(\t\022\031\n\021d" + "eadLetterCACerts\030\006 \001(\t\022\032\n\022deadLetterAudi" - + "ence\030\007 \001(\t\022\016\n\006format\030\010 \001(\t\022\r\n\005retry\030\002 \001(" - + "\r\022%\n\rbackoffPolicy\030\003 \001(\0162\016.BackoffPolicy" - + "\022\024\n\014backoffDelay\030\004 \001(\004\022\017\n\007timeout\030\005 \001(\004\"" - + "\302\004\n\006Egress\022\025\n\rconsumerGroup\030\001 \001(\t\022\023\n\013des" - + "tination\030\002 \001(\t\022\032\n\022destinationCACerts\030\017 \001" - + "(\t\022\033\n\023destinationAudience\030\021 \001(\t\022\022\n\010reply" - + "Url\030\003 \001(\tH\000\022&\n\024replyToOriginalTopic\030\004 \001(" - + "\0132\006.EmptyH\000\022\036\n\014discardReply\030\t \001(\0132\006.Empt" - + "yH\000\022\027\n\017replyUrlCACerts\030\020 \001(\t\022\030\n\020replyUrl" - + "Audience\030\022 \001(\t\022\027\n\006filter\030\005 \001(\0132\007.Filter\022" - + "\013\n\003uid\030\006 \001(\t\022#\n\014egressConfig\030\007 \001(\0132\r.Egr" - + "essConfig\022%\n\rdeliveryOrder\030\010 \001(\0162\016.Deliv" - + "eryOrder\022\031\n\007keyType\030\n \001(\0162\010.KeyType\022\035\n\tr" - + "eference\030\013 \001(\0132\n.Reference\022)\n\017dialectedF" - + "ilter\030\014 \003(\0132\020.DialectedFilter\022\021\n\tvReplic" - + "as\030\r \001(\005\022)\n\014featureFlags\030\016 \001(\0132\023.EgressF" - + "eatureFlags\022\036\n\026oidcServiceAccountName\030\023 " - + "\001(\tB\017\n\rreplyStrategy\"U\n\022EgressFeatureFla" - + "gs\022\031\n\021enableRateLimiter\030\001 \001(\010\022$\n\034enableO" - + "rderedExecutorMetrics\030\002 \001(\010\"~\n\007Ingress\022!" - + "\n\013contentMode\030\001 \001(\0162\014.ContentMode\022\014\n\004pat" - + "h\030\002 \001(\t\022\014\n\004host\030\003 \001(\t\022\"\n\032enableAutoCreat" - + "eEventTypes\030\004 \001(\010\022\020\n\010audience\030\005 \001(\t\"o\n\tR" - + "eference\022\014\n\004uuid\030\001 \001(\t\022\021\n\tnamespace\030\002 \001(" - + "\t\022\014\n\004name\030\003 \001(\t\022\017\n\007version\030\004 \001(\t\022\014\n\004kind" - + "\030\005 \001(\t\022\024\n\014groupVersion\030\006 \001(\t\"`\n\017SecretRe" - + "ference\022\035\n\treference\030\001 \001(\0132\n.Reference\022." - + "\n\022keyFieldReferences\030\002 \003(\0132\022.KeyFieldRef" - + "erence\"C\n\021KeyFieldReference\022\021\n\tsecretKey" - + "\030\002 \001(\t\022\033\n\005field\030\003 \001(\0162\014.SecretField\"Y\n\024M" - + "ultiSecretReference\022\033\n\010protocol\030\001 \001(\0162\t." - + "Protocol\022$\n\nreferences\030\002 \003(\0132\020.SecretRef" - + "erence\"\202\001\n\023CloudEventOverrides\0228\n\nextens" - + "ions\030\001 \003(\0132$.CloudEventOverrides.Extensi" - + "onsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\350\002\n\010Resource\022\013\n\003uid\030" - + "\001 \001(\t\022\016\n\006topics\030\002 \003(\t\022\030\n\020bootstrapServer" - + "s\030\003 \001(\t\022\031\n\007ingress\030\004 \001(\0132\010.Ingress\022#\n\014eg" - + "ressConfig\030\005 \001(\0132\r.EgressConfig\022\031\n\010egres" - + "ses\030\006 \003(\0132\007.Egress\022\034\n\nabsentAuth\030\007 \001(\0132\006" - + ".EmptyH\000\022 \n\nauthSecret\030\010 \001(\0132\n.Reference" - + "H\000\0220\n\017multiAuthSecret\030\t \001(\0132\025.MultiSecre" - + "tReferenceH\000\0221\n\023cloudEventOverrides\030\n \001(" - + "\0132\024.CloudEventOverrides\022\035\n\treference\030\013 \001" - + "(\0132\n.ReferenceB\006\n\004Auth\"R\n\010Contract\022\022\n\nge" - + "neration\030\001 \001(\004\022\034\n\tresources\030\002 \003(\0132\t.Reso" - + "urce\022\024\n\014trustBundles\030\003 \003(\t*,\n\rBackoffPol" - + "icy\022\017\n\013Exponential\020\000\022\n\n\006Linear\020\001*+\n\rDeli" - + "veryOrder\022\r\n\tUNORDERED\020\000\022\013\n\007ORDERED\020\001*=\n" - + "\007KeyType\022\n\n\006String\020\000\022\013\n\007Integer\020\001\022\n\n\006Dou" - + "ble\020\002\022\r\n\tByteArray\020\003*)\n\013ContentMode\022\n\n\006B" - + "INARY\020\000\022\016\n\nSTRUCTURED\020\001*a\n\013SecretField\022\022" - + "\n\016SASL_MECHANISM\020\000\022\n\n\006CA_CRT\020\001\022\014\n\010USER_C" - + "RT\020\002\022\014\n\010USER_KEY\020\003\022\010\n\004USER\020\004\022\014\n\010PASSWORD" - + "\020\005*D\n\010Protocol\022\r\n\tPLAINTEXT\020\000\022\022\n\016SASL_PL" - + "AINTEXT\020\001\022\007\n\003SSL\020\002\022\014\n\010SASL_SSL\020\003B[\n*dev." - + "knative.eventing.kafka.broker.contractB\021" - + "DataPlaneContractZ\032control-plane/pkg/con" - + "tractb\006proto3" + + "ence\030\007 \001(\t\022\037\n\006format\030\010 \001(\0162\017.DeliveryFor" + + "mat\022\r\n\005retry\030\002 \001(\r\022%\n\rbackoffPolicy\030\003 \001(" + + "\0162\016.BackoffPolicy\022\024\n\014backoffDelay\030\004 \001(\004\022" + + "\017\n\007timeout\030\005 \001(\004\"\302\004\n\006Egress\022\025\n\rconsumerG" + + "roup\030\001 \001(\t\022\023\n\013destination\030\002 \001(\t\022\032\n\022desti" + + "nationCACerts\030\017 \001(\t\022\033\n\023destinationAudien" + + "ce\030\021 \001(\t\022\022\n\010replyUrl\030\003 \001(\tH\000\022&\n\024replyToO" + + "riginalTopic\030\004 \001(\0132\006.EmptyH\000\022\036\n\014discardR" + + "eply\030\t \001(\0132\006.EmptyH\000\022\027\n\017replyUrlCACerts\030" + + "\020 \001(\t\022\030\n\020replyUrlAudience\030\022 \001(\t\022\027\n\006filte" + + "r\030\005 \001(\0132\007.Filter\022\013\n\003uid\030\006 \001(\t\022#\n\014egressC" + + "onfig\030\007 \001(\0132\r.EgressConfig\022%\n\rdeliveryOr" + + "der\030\010 \001(\0162\016.DeliveryOrder\022\031\n\007keyType\030\n \001" + + "(\0162\010.KeyType\022\035\n\treference\030\013 \001(\0132\n.Refere" + + "nce\022)\n\017dialectedFilter\030\014 \003(\0132\020.Dialected" + + "Filter\022\021\n\tvReplicas\030\r \001(\005\022)\n\014featureFlag" + + "s\030\016 \001(\0132\023.EgressFeatureFlags\022\036\n\026oidcServ" + + "iceAccountName\030\023 \001(\tB\017\n\rreplyStrategy\"U\n" + + "\022EgressFeatureFlags\022\031\n\021enableRateLimiter" + + "\030\001 \001(\010\022$\n\034enableOrderedExecutorMetrics\030\002" + + " \001(\010\"~\n\007Ingress\022!\n\013contentMode\030\001 \001(\0162\014.C" + + "ontentMode\022\014\n\004path\030\002 \001(\t\022\014\n\004host\030\003 \001(\t\022\"" + + "\n\032enableAutoCreateEventTypes\030\004 \001(\010\022\020\n\010au" + + "dience\030\005 \001(\t\"o\n\tReference\022\014\n\004uuid\030\001 \001(\t\022" + + "\021\n\tnamespace\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007vers" + + "ion\030\004 \001(\t\022\014\n\004kind\030\005 \001(\t\022\024\n\014groupVersion\030" + + "\006 \001(\t\"`\n\017SecretReference\022\035\n\treference\030\001 " + + "\001(\0132\n.Reference\022.\n\022keyFieldReferences\030\002 " + + "\003(\0132\022.KeyFieldReference\"C\n\021KeyFieldRefer" + + "ence\022\021\n\tsecretKey\030\002 \001(\t\022\033\n\005field\030\003 \001(\0162\014" + + ".SecretField\"Y\n\024MultiSecretReference\022\033\n\010" + + "protocol\030\001 \001(\0162\t.Protocol\022$\n\nreferences\030" + + "\002 \003(\0132\020.SecretReference\"\202\001\n\023CloudEventOv" + + "errides\0228\n\nextensions\030\001 \003(\0132$.CloudEvent" + + "Overrides.ExtensionsEntry\0321\n\017ExtensionsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\350\002\n" + + "\010Resource\022\013\n\003uid\030\001 \001(\t\022\016\n\006topics\030\002 \003(\t\022\030" + + "\n\020bootstrapServers\030\003 \001(\t\022\031\n\007ingress\030\004 \001(" + + "\0132\010.Ingress\022#\n\014egressConfig\030\005 \001(\0132\r.Egre" + + "ssConfig\022\031\n\010egresses\030\006 \003(\0132\007.Egress\022\034\n\na" + + "bsentAuth\030\007 \001(\0132\006.EmptyH\000\022 \n\nauthSecret\030" + + "\010 \001(\0132\n.ReferenceH\000\0220\n\017multiAuthSecret\030\t" + + " \001(\0132\025.MultiSecretReferenceH\000\0221\n\023cloudEv" + + "entOverrides\030\n \001(\0132\024.CloudEventOverrides" + + "\022\035\n\treference\030\013 \001(\0132\n.ReferenceB\006\n\004Auth\"" + + "R\n\010Contract\022\022\n\ngeneration\030\001 \001(\004\022\034\n\tresou" + + "rces\030\002 \003(\0132\t.Resource\022\024\n\014trustBundles\030\003 " + + "\003(\t*,\n\rBackoffPolicy\022\017\n\013Exponential\020\000\022\n\n" + + "\006Linear\020\001*&\n\016DeliveryFormat\022\n\n\006Binary\020\000\022" + + "\010\n\004JSON\020\001*+\n\rDeliveryOrder\022\r\n\tUNORDERED\020" + + "\000\022\013\n\007ORDERED\020\001*=\n\007KeyType\022\n\n\006String\020\000\022\013\n" + + "\007Integer\020\001\022\n\n\006Double\020\002\022\r\n\tByteArray\020\003*)\n" + + "\013ContentMode\022\n\n\006BINARY\020\000\022\016\n\nSTRUCTURED\020\001" + + "*a\n\013SecretField\022\022\n\016SASL_MECHANISM\020\000\022\n\n\006C" + + "A_CRT\020\001\022\014\n\010USER_CRT\020\002\022\014\n\010USER_KEY\020\003\022\010\n\004U" + + "SER\020\004\022\014\n\010PASSWORD\020\005*D\n\010Protocol\022\r\n\tPLAIN" + + "TEXT\020\000\022\022\n\016SASL_PLAINTEXT\020\001\022\007\n\003SSL\020\002\022\014\n\010S" + + "ASL_SSL\020\003B[\n*dev.knative.eventing.kafka." + + "broker.contractB\021DataPlaneContractZ\032cont" + + "rol-plane/pkg/contractb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); diff --git a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/http/WebClientCloudEventSender.java b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/http/WebClientCloudEventSender.java index 25793a68c1..01670f2bac 100644 --- a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/http/WebClientCloudEventSender.java +++ b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/impl/http/WebClientCloudEventSender.java @@ -27,6 +27,7 @@ import dev.knative.eventing.kafka.broker.dispatcher.main.ConsumerVerticleContext; import io.cloudevents.CloudEvent; import io.cloudevents.http.vertx.VertxMessageFactory; +import io.cloudevents.jackson.JsonFormat; import io.cloudevents.rw.CloudEventRWException; import io.micrometer.core.instrument.Tags; import io.vertx.core.Future; @@ -64,6 +65,8 @@ public final class WebClientCloudEventSender implements CloudEventSender { private final AtomicInteger inFlightRequests = new AtomicInteger(0); private final TokenProvider tokenProvider; + private final DataPlaneContract.DeliveryFormat deliveryFormat; + /** * All args constructor. * @@ -98,6 +101,7 @@ public WebClientCloudEventSender( this.consumerVerticleContext = consumerVerticleContext; this.retryPolicyFunc = computeRetryPolicy(consumerVerticleContext.getEgressConfig()); this.tokenProvider = new TokenProvider(vertx); + this.deliveryFormat = consumerVerticleContext.getEgressConfig().getFormat(); Metrics.eventDispatchInFlightCount( additionalTags.and(consumerVerticleContext.getTags()), this.inFlightRequests::get) @@ -220,7 +224,13 @@ private Future send(final CloudEvent event, final Promise writer.writeStructured(event, new JsonFormat()); + case Binary, UNRECOGNIZED -> writer.writeBinary(event); + case null -> writer.writeBinary(event); + }; }) .onFailure(ex -> { logError(event, ex); diff --git a/proto/contract.proto b/proto/contract.proto index f552d7638a..3a7a710eaf 100644 --- a/proto/contract.proto +++ b/proto/contract.proto @@ -71,6 +71,15 @@ enum BackoffPolicy { Linear = 1; } +// DeliveryFormat is the format used to send events +enum DeliveryFormat { + // Binary event format + Binary = 0; + + // JSON structured event format + JSON = 1; +} + message EgressConfig { // Dead letter is where the event is sent when something goes wrong string deadLetter = 1; @@ -82,7 +91,7 @@ message EgressConfig { string deadLetterAudience = 7; // format is the format used to deliver the event. Can be one of "json" or "binary" - string format = 8; + DeliveryFormat format = 8; // retry is the minimum number of retries the sender should attempt when // sending an event before moving it to the dead letter sink.