From 8a9ee475b1ca7f6e1a8be99c76cbb38ef3fd190f Mon Sep 17 00:00:00 2001 From: kaidaguerre Date: Wed, 23 Jun 2021 17:16:16 +0100 Subject: [PATCH] Add limit to QueryContext. Rename QueryContext.Quals to QueryContext.RawQuals. Closes #119 --- grpc/proto/plugin.pb.go | 541 ++++++++++++++++++++---------------- grpc/proto/plugin.proto | 5 + grpc/proto/query_context.go | 14 + plugin/plugin.go | 4 +- plugin/query_context.go | 24 ++ plugin/query_data.go | 8 +- plugin/table_fetch.go | 2 +- 7 files changed, 357 insertions(+), 241 deletions(-) create mode 100644 grpc/proto/query_context.go create mode 100644 plugin/query_context.go diff --git a/grpc/proto/plugin.pb.go b/grpc/proto/plugin.pb.go index e93c3f6f..3b51b3b0 100644 --- a/grpc/proto/plugin.pb.go +++ b/grpc/proto/plugin.pb.go @@ -8,9 +8,6 @@ package proto import ( context "context" - reflect "reflect" - sync "sync" - proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" grpc "google.golang.org/grpc" @@ -18,6 +15,8 @@ import ( status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -687,6 +686,7 @@ type QueryContext struct { Columns []string `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"` Quals map[string]*Quals `protobuf:"bytes,2,rep,name=quals,proto3" json:"quals,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Limit *NullableInt `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` } func (x *QueryContext) Reset() { @@ -735,6 +735,60 @@ func (x *QueryContext) GetQuals() map[string]*Quals { return nil } +func (x *QueryContext) GetLimit() *NullableInt { + if x != nil { + return x.Limit + } + return nil +} + +type NullableInt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *NullableInt) Reset() { + *x = NullableInt{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NullableInt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NullableInt) ProtoMessage() {} + +func (x *NullableInt) ProtoReflect() protoreflect.Message { + mi := &file_plugin_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) +} + +// Deprecated: Use NullableInt.ProtoReflect.Descriptor instead. +func (*NullableInt) Descriptor() ([]byte, []int) { + return file_plugin_proto_rawDescGZIP(), []int{7} +} + +func (x *NullableInt) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + type ExecuteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -748,7 +802,7 @@ type ExecuteRequest struct { func (x *ExecuteRequest) Reset() { *x = ExecuteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[7] + mi := &file_plugin_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -761,7 +815,7 @@ func (x *ExecuteRequest) String() string { func (*ExecuteRequest) ProtoMessage() {} func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[7] + mi := &file_plugin_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -774,7 +828,7 @@ func (x *ExecuteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead. func (*ExecuteRequest) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{7} + return file_plugin_proto_rawDescGZIP(), []int{8} } func (x *ExecuteRequest) GetTable() string { @@ -809,7 +863,7 @@ type ExecuteResponse struct { func (x *ExecuteResponse) Reset() { *x = ExecuteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[8] + mi := &file_plugin_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -822,7 +876,7 @@ func (x *ExecuteResponse) String() string { func (*ExecuteResponse) ProtoMessage() {} func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[8] + mi := &file_plugin_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -835,7 +889,7 @@ func (x *ExecuteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead. func (*ExecuteResponse) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{8} + return file_plugin_proto_rawDescGZIP(), []int{9} } func (x *ExecuteResponse) GetRow() *Row { @@ -854,7 +908,7 @@ type GetSchemaRequest struct { func (x *GetSchemaRequest) Reset() { *x = GetSchemaRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[9] + mi := &file_plugin_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -867,7 +921,7 @@ func (x *GetSchemaRequest) String() string { func (*GetSchemaRequest) ProtoMessage() {} func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[9] + mi := &file_plugin_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -880,7 +934,7 @@ func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{9} + return file_plugin_proto_rawDescGZIP(), []int{10} } type GetSchemaResponse struct { @@ -894,7 +948,7 @@ type GetSchemaResponse struct { func (x *GetSchemaResponse) Reset() { *x = GetSchemaResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[10] + mi := &file_plugin_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -907,7 +961,7 @@ func (x *GetSchemaResponse) String() string { func (*GetSchemaResponse) ProtoMessage() {} func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[10] + mi := &file_plugin_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -920,7 +974,7 @@ func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead. func (*GetSchemaResponse) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{10} + return file_plugin_proto_rawDescGZIP(), []int{11} } func (x *GetSchemaResponse) GetSchema() *Schema { @@ -942,7 +996,7 @@ type SetConnectionConfigRequest struct { func (x *SetConnectionConfigRequest) Reset() { *x = SetConnectionConfigRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[11] + mi := &file_plugin_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -955,7 +1009,7 @@ func (x *SetConnectionConfigRequest) String() string { func (*SetConnectionConfigRequest) ProtoMessage() {} func (x *SetConnectionConfigRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[11] + mi := &file_plugin_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -968,7 +1022,7 @@ func (x *SetConnectionConfigRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetConnectionConfigRequest.ProtoReflect.Descriptor instead. func (*SetConnectionConfigRequest) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{11} + return file_plugin_proto_rawDescGZIP(), []int{12} } func (x *SetConnectionConfigRequest) GetConnectionName() string { @@ -994,7 +1048,7 @@ type SetConnectionConfigResponse struct { func (x *SetConnectionConfigResponse) Reset() { *x = SetConnectionConfigResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[12] + mi := &file_plugin_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1007,7 +1061,7 @@ func (x *SetConnectionConfigResponse) String() string { func (*SetConnectionConfigResponse) ProtoMessage() {} func (x *SetConnectionConfigResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[12] + mi := &file_plugin_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1020,7 +1074,7 @@ func (x *SetConnectionConfigResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetConnectionConfigResponse.ProtoReflect.Descriptor instead. func (*SetConnectionConfigResponse) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{12} + return file_plugin_proto_rawDescGZIP(), []int{13} } type Row struct { @@ -1034,7 +1088,7 @@ type Row struct { func (x *Row) Reset() { *x = Row{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[13] + mi := &file_plugin_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1047,7 +1101,7 @@ func (x *Row) String() string { func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[13] + mi := &file_plugin_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1060,7 +1114,7 @@ func (x *Row) ProtoReflect() protoreflect.Message { // Deprecated: Use Row.ProtoReflect.Descriptor instead. func (*Row) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{13} + return file_plugin_proto_rawDescGZIP(), []int{14} } func (x *Row) GetColumns() map[string]*Column { @@ -1085,7 +1139,7 @@ type TableSchema struct { func (x *TableSchema) Reset() { *x = TableSchema{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[14] + mi := &file_plugin_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1098,7 +1152,7 @@ func (x *TableSchema) String() string { func (*TableSchema) ProtoMessage() {} func (x *TableSchema) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[14] + mi := &file_plugin_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1111,7 +1165,7 @@ func (x *TableSchema) ProtoReflect() protoreflect.Message { // Deprecated: Use TableSchema.ProtoReflect.Descriptor instead. func (*TableSchema) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{14} + return file_plugin_proto_rawDescGZIP(), []int{15} } func (x *TableSchema) GetColumns() []*ColumnDefinition { @@ -1163,7 +1217,7 @@ type KeyColumnsSet struct { func (x *KeyColumnsSet) Reset() { *x = KeyColumnsSet{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[15] + mi := &file_plugin_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1176,7 +1230,7 @@ func (x *KeyColumnsSet) String() string { func (*KeyColumnsSet) ProtoMessage() {} func (x *KeyColumnsSet) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[15] + mi := &file_plugin_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1189,7 +1243,7 @@ func (x *KeyColumnsSet) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyColumnsSet.ProtoReflect.Descriptor instead. func (*KeyColumnsSet) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{15} + return file_plugin_proto_rawDescGZIP(), []int{16} } func (x *KeyColumnsSet) GetSingle() string { @@ -1226,7 +1280,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[16] + mi := &file_plugin_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1239,7 +1293,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[16] + mi := &file_plugin_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1252,7 +1306,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{16} + return file_plugin_proto_rawDescGZIP(), []int{17} } func (x *Schema) GetSchema() map[string]*TableSchema { @@ -1297,7 +1351,7 @@ type Column struct { func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[17] + mi := &file_plugin_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1310,7 +1364,7 @@ func (x *Column) String() string { func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[17] + mi := &file_plugin_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1323,7 +1377,7 @@ func (x *Column) ProtoReflect() protoreflect.Message { // Deprecated: Use Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{17} + return file_plugin_proto_rawDescGZIP(), []int{18} } func (m *Column) GetValue() isColumn_Value { @@ -1476,7 +1530,7 @@ type ColumnDefinition struct { func (x *ColumnDefinition) Reset() { *x = ColumnDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_proto_msgTypes[18] + mi := &file_plugin_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1489,7 +1543,7 @@ func (x *ColumnDefinition) String() string { func (*ColumnDefinition) ProtoMessage() {} func (x *ColumnDefinition) ProtoReflect() protoreflect.Message { - mi := &file_plugin_proto_msgTypes[18] + mi := &file_plugin_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1502,7 +1556,7 @@ func (x *ColumnDefinition) ProtoReflect() protoreflect.Message { // Deprecated: Use ColumnDefinition.ProtoReflect.Descriptor instead. func (*ColumnDefinition) Descriptor() ([]byte, []int) { - return file_plugin_proto_rawDescGZIP(), []int{18} + return file_plugin_proto_rawDescGZIP(), []int{19} } func (x *ColumnDefinition) GetName() string { @@ -1588,148 +1642,153 @@ var file_plugin_proto_rawDesc = []byte{ 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x05, 0x51, 0x75, 0x61, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x52, 0x05, 0x71, - 0x75, 0x61, 0x6c, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, + 0x75, 0x61, 0x6c, 0x73, 0x22, 0xd0, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x34, 0x0a, 0x05, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 0x71, 0x75, 0x61, 0x6c, 0x73, 0x1a, 0x46, 0x0a, 0x0a, 0x51, 0x75, 0x61, 0x6c, 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, 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x61, - 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x80, 0x01, - 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x2f, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x03, 0x72, 0x6f, - 0x77, 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x22, 0x72, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x31, 0x0a, 0x07, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x1a, - 0x49, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 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, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x02, 0x0a, 0x0b, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x42, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x53, 0x65, 0x74, - 0x52, 0x11, 0x67, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, - 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x73, 0x53, 0x65, 0x74, 0x52, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, - 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x1a, 0x6c, 0x69, 0x73, - 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x53, 0x65, 0x74, 0x52, 0x1a, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, - 0x4b, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x53, 0x65, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6e, - 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x22, 0xd6, 0x01, 0x0a, - 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x64, - 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x4d, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x12, 0x31, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x75, 0x6c, - 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, - 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, - 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, - 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x08, 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, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, - 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, - 0x67, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x22, 0x6f, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x2a, 0x1b, 0x0a, 0x09, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, - 0x0a, 0x0a, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x2a, 0x8a, - 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, - 0x04, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x01, - 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x05, - 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x50, 0x41, 0x44, 0x44, 0x52, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, - 0x43, 0x49, 0x44, 0x52, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, - 0x41, 0x4d, 0x50, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x32, 0xe9, 0x01, 0x0a, 0x0d, - 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x3e, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5c, 0x0a, 0x13, 0x53, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x61, 0x6c, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x75, 0x6c, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, + 0x46, 0x0a, 0x0a, 0x51, 0x75, 0x61, 0x6c, 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, + 0x22, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x61, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x0b, 0x4e, 0x75, 0x6c, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x80, 0x01, 0x0a, + 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x2f, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x03, 0x72, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x03, 0x72, 0x6f, 0x77, + 0x22, 0x12, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x22, 0x72, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x31, 0x0a, 0x07, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x6f, 0x77, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x1a, 0x49, + 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 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, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc2, 0x02, 0x0a, 0x0b, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x31, 0x0a, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, + 0x0a, 0x11, 0x67, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x53, 0x65, 0x74, 0x52, + 0x11, 0x67, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x12, 0x44, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, + 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x53, 0x65, 0x74, 0x52, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4b, 0x65, + 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x1a, 0x6c, 0x69, 0x73, 0x74, + 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x53, + 0x65, 0x74, 0x52, 0x1a, 0x6c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x4b, + 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x53, 0x65, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6e, 0x79, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x22, 0xd6, 0x01, 0x0a, 0x06, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x64, 0x6b, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x4d, 0x0a, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x88, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, + 0x31, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, + 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, + 0x48, 0x00, 0x52, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, + 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x08, 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, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x69, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x69, + 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x6f, 0x0a, 0x10, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x2a, 0x1b, 0x0a, 0x09, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, + 0x0a, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x2a, 0x8a, 0x01, + 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x54, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, + 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, + 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x05, 0x12, + 0x0a, 0x0a, 0x06, 0x49, 0x50, 0x41, 0x44, 0x44, 0x52, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x43, + 0x49, 0x44, 0x52, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, + 0x4d, 0x50, 0x10, 0x08, 0x12, 0x14, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x32, 0xe9, 0x01, 0x0a, 0x0d, 0x57, + 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x3e, 0x0a, 0x09, + 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5c, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1745,7 +1804,7 @@ func file_plugin_proto_rawDescGZIP() []byte { } var file_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_plugin_proto_goTypes = []interface{}{ (NullValue)(0), // 0: proto.NullValue (ColumnType)(0), // 1: proto.ColumnType @@ -1757,22 +1816,23 @@ var file_plugin_proto_goTypes = []interface{}{ (*Inet)(nil), // 7: proto.Inet (*Quals)(nil), // 8: proto.Quals (*QueryContext)(nil), // 9: proto.QueryContext - (*ExecuteRequest)(nil), // 10: proto.ExecuteRequest - (*ExecuteResponse)(nil), // 11: proto.ExecuteResponse - (*GetSchemaRequest)(nil), // 12: proto.GetSchemaRequest - (*GetSchemaResponse)(nil), // 13: proto.GetSchemaResponse - (*SetConnectionConfigRequest)(nil), // 14: proto.SetConnectionConfigRequest - (*SetConnectionConfigResponse)(nil), // 15: proto.SetConnectionConfigResponse - (*Row)(nil), // 16: proto.Row - (*TableSchema)(nil), // 17: proto.TableSchema - (*KeyColumnsSet)(nil), // 18: proto.KeyColumnsSet - (*Schema)(nil), // 19: proto.Schema - (*Column)(nil), // 20: proto.Column - (*ColumnDefinition)(nil), // 21: proto.ColumnDefinition - nil, // 22: proto.QueryContext.QualsEntry - nil, // 23: proto.Row.ColumnsEntry - nil, // 24: proto.Schema.SchemaEntry - (*timestamp.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*NullableInt)(nil), // 10: proto.NullableInt + (*ExecuteRequest)(nil), // 11: proto.ExecuteRequest + (*ExecuteResponse)(nil), // 12: proto.ExecuteResponse + (*GetSchemaRequest)(nil), // 13: proto.GetSchemaRequest + (*GetSchemaResponse)(nil), // 14: proto.GetSchemaResponse + (*SetConnectionConfigRequest)(nil), // 15: proto.SetConnectionConfigRequest + (*SetConnectionConfigResponse)(nil), // 16: proto.SetConnectionConfigResponse + (*Row)(nil), // 17: proto.Row + (*TableSchema)(nil), // 18: proto.TableSchema + (*KeyColumnsSet)(nil), // 19: proto.KeyColumnsSet + (*Schema)(nil), // 20: proto.Schema + (*Column)(nil), // 21: proto.Column + (*ColumnDefinition)(nil), // 22: proto.ColumnDefinition + nil, // 23: proto.QueryContext.QualsEntry + nil, // 24: proto.Row.ColumnsEntry + nil, // 25: proto.Schema.SchemaEntry + (*timestamp.Timestamp)(nil), // 26: google.protobuf.Timestamp } var file_plugin_proto_depIdxs = []int32{ 2, // 0: proto.Operator.operation:type_name -> proto.Operator.Operation @@ -1780,36 +1840,37 @@ var file_plugin_proto_depIdxs = []int32{ 6, // 2: proto.Qual.value:type_name -> proto.QualValue 6, // 3: proto.QualValueList.values:type_name -> proto.QualValue 7, // 4: proto.QualValue.inet_value:type_name -> proto.Inet - 25, // 5: proto.QualValue.timestamp_value:type_name -> google.protobuf.Timestamp + 26, // 5: proto.QualValue.timestamp_value:type_name -> google.protobuf.Timestamp 5, // 6: proto.QualValue.list_value:type_name -> proto.QualValueList 4, // 7: proto.Quals.quals:type_name -> proto.Qual - 22, // 8: proto.QueryContext.quals:type_name -> proto.QueryContext.QualsEntry - 9, // 9: proto.ExecuteRequest.query_context:type_name -> proto.QueryContext - 16, // 10: proto.ExecuteResponse.row:type_name -> proto.Row - 19, // 11: proto.GetSchemaResponse.schema:type_name -> proto.Schema - 23, // 12: proto.Row.columns:type_name -> proto.Row.ColumnsEntry - 21, // 13: proto.TableSchema.columns:type_name -> proto.ColumnDefinition - 18, // 14: proto.TableSchema.getCallKeyColumns:type_name -> proto.KeyColumnsSet - 18, // 15: proto.TableSchema.listCallKeyColumns:type_name -> proto.KeyColumnsSet - 18, // 16: proto.TableSchema.listCallOptionalKeyColumns:type_name -> proto.KeyColumnsSet - 24, // 17: proto.Schema.schema:type_name -> proto.Schema.SchemaEntry - 0, // 18: proto.Column.null_value:type_name -> proto.NullValue - 25, // 19: proto.Column.timestamp_value:type_name -> google.protobuf.Timestamp - 1, // 20: proto.ColumnDefinition.type:type_name -> proto.ColumnType - 8, // 21: proto.QueryContext.QualsEntry.value:type_name -> proto.Quals - 20, // 22: proto.Row.ColumnsEntry.value:type_name -> proto.Column - 17, // 23: proto.Schema.SchemaEntry.value:type_name -> proto.TableSchema - 12, // 24: proto.WrapperPlugin.GetSchema:input_type -> proto.GetSchemaRequest - 10, // 25: proto.WrapperPlugin.Execute:input_type -> proto.ExecuteRequest - 14, // 26: proto.WrapperPlugin.SetConnectionConfig:input_type -> proto.SetConnectionConfigRequest - 13, // 27: proto.WrapperPlugin.GetSchema:output_type -> proto.GetSchemaResponse - 11, // 28: proto.WrapperPlugin.Execute:output_type -> proto.ExecuteResponse - 15, // 29: proto.WrapperPlugin.SetConnectionConfig:output_type -> proto.SetConnectionConfigResponse - 27, // [27:30] is the sub-list for method output_type - 24, // [24:27] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 23, // 8: proto.QueryContext.quals:type_name -> proto.QueryContext.QualsEntry + 10, // 9: proto.QueryContext.limit:type_name -> proto.NullableInt + 9, // 10: proto.ExecuteRequest.query_context:type_name -> proto.QueryContext + 17, // 11: proto.ExecuteResponse.row:type_name -> proto.Row + 20, // 12: proto.GetSchemaResponse.schema:type_name -> proto.Schema + 24, // 13: proto.Row.columns:type_name -> proto.Row.ColumnsEntry + 22, // 14: proto.TableSchema.columns:type_name -> proto.ColumnDefinition + 19, // 15: proto.TableSchema.getCallKeyColumns:type_name -> proto.KeyColumnsSet + 19, // 16: proto.TableSchema.listCallKeyColumns:type_name -> proto.KeyColumnsSet + 19, // 17: proto.TableSchema.listCallOptionalKeyColumns:type_name -> proto.KeyColumnsSet + 25, // 18: proto.Schema.schema:type_name -> proto.Schema.SchemaEntry + 0, // 19: proto.Column.null_value:type_name -> proto.NullValue + 26, // 20: proto.Column.timestamp_value:type_name -> google.protobuf.Timestamp + 1, // 21: proto.ColumnDefinition.type:type_name -> proto.ColumnType + 8, // 22: proto.QueryContext.QualsEntry.value:type_name -> proto.Quals + 21, // 23: proto.Row.ColumnsEntry.value:type_name -> proto.Column + 18, // 24: proto.Schema.SchemaEntry.value:type_name -> proto.TableSchema + 13, // 25: proto.WrapperPlugin.GetSchema:input_type -> proto.GetSchemaRequest + 11, // 26: proto.WrapperPlugin.Execute:input_type -> proto.ExecuteRequest + 15, // 27: proto.WrapperPlugin.SetConnectionConfig:input_type -> proto.SetConnectionConfigRequest + 14, // 28: proto.WrapperPlugin.GetSchema:output_type -> proto.GetSchemaResponse + 12, // 29: proto.WrapperPlugin.Execute:output_type -> proto.ExecuteResponse + 16, // 30: proto.WrapperPlugin.SetConnectionConfig:output_type -> proto.SetConnectionConfigResponse + 28, // [28:31] is the sub-list for method output_type + 25, // [25:28] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_plugin_proto_init() } @@ -1903,7 +1964,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteRequest); i { + switch v := v.(*NullableInt); i { case 0: return &v.state case 1: @@ -1915,7 +1976,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecuteResponse); i { + switch v := v.(*ExecuteRequest); i { case 0: return &v.state case 1: @@ -1927,7 +1988,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaRequest); i { + switch v := v.(*ExecuteResponse); i { case 0: return &v.state case 1: @@ -1939,7 +2000,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaResponse); i { + switch v := v.(*GetSchemaRequest); i { case 0: return &v.state case 1: @@ -1951,7 +2012,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConnectionConfigRequest); i { + switch v := v.(*GetSchemaResponse); i { case 0: return &v.state case 1: @@ -1963,7 +2024,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConnectionConfigResponse); i { + switch v := v.(*SetConnectionConfigRequest); i { case 0: return &v.state case 1: @@ -1975,7 +2036,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Row); i { + switch v := v.(*SetConnectionConfigResponse); i { case 0: return &v.state case 1: @@ -1987,7 +2048,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TableSchema); i { + switch v := v.(*Row); i { case 0: return &v.state case 1: @@ -1999,7 +2060,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyColumnsSet); i { + switch v := v.(*TableSchema); i { case 0: return &v.state case 1: @@ -2011,7 +2072,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { + switch v := v.(*KeyColumnsSet); i { case 0: return &v.state case 1: @@ -2023,7 +2084,7 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Column); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -2035,6 +2096,18 @@ func file_plugin_proto_init() { } } file_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Column); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ColumnDefinition); i { case 0: return &v.state @@ -2061,7 +2134,7 @@ func file_plugin_proto_init() { (*QualValue_TimestampValue)(nil), (*QualValue_ListValue)(nil), } - file_plugin_proto_msgTypes[17].OneofWrappers = []interface{}{ + file_plugin_proto_msgTypes[18].OneofWrappers = []interface{}{ (*Column_NullValue)(nil), (*Column_DoubleValue)(nil), (*Column_IntValue)(nil), @@ -2078,7 +2151,7 @@ func file_plugin_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_proto_rawDesc, NumEnums: 3, - NumMessages: 22, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, diff --git a/grpc/proto/plugin.proto b/grpc/proto/plugin.proto index 9f880633..c25aca1d 100644 --- a/grpc/proto/plugin.proto +++ b/grpc/proto/plugin.proto @@ -55,6 +55,11 @@ message Quals { message QueryContext { repeated string columns = 1; map quals = 2; + NullableInt limit = 3; +} + +message NullableInt { + int64 value=1; } message ExecuteRequest { diff --git a/grpc/proto/query_context.go b/grpc/proto/query_context.go new file mode 100644 index 00000000..9895879e --- /dev/null +++ b/grpc/proto/query_context.go @@ -0,0 +1,14 @@ +package proto + +// NewQueryContext creates a proto.QueryContext from provided columns, qualMap, and if non-nul, the limit +func NewQueryContext(columns []string, qualMap map[string]*Quals, limit int64) *QueryContext { + var queryContext = &QueryContext{ + Columns: columns, + Quals: qualMap, + } + if limit != -1 { + queryContext.Limit = &NullableInt{Value: limit} + } + + return queryContext +} diff --git a/plugin/plugin.go b/plugin/plugin.go index 661bfcc4..eae981b1 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -105,7 +105,7 @@ func (p *Plugin) Execute(req *proto.ExecuteRequest, stream proto.WrapperPlugin_E logging.LogTime("Start execute") p.Logger.Debug("Execute ", "connection", req.Connection, "connection config", p.Connections, "table", req.Table) - queryContext := req.QueryContext + queryContext := NewQueryContext(req.QueryContext) table, ok := p.TableMap[req.Table] if !ok { return fmt.Errorf("plugin %s does not provide table %s", p.Name, req.Table) @@ -137,7 +137,7 @@ func (p *Plugin) Execute(req *proto.ExecuteRequest, stream proto.WrapperPlugin_E } queryData := newQueryData(queryContext, table, stream, connection, matrixItem, p.ConnectionManager) - p.Logger.Debug("calling fetchItems", "table", table.Name, "matrixItem", matrixItem) + p.Logger.Trace("calling fetchItems", "table", table.Name, "matrixItem", matrixItem, "limit", queryContext.Limit) // asyncronously fetch items if err := table.fetchItems(ctx, queryData); err != nil { diff --git a/plugin/query_context.go b/plugin/query_context.go new file mode 100644 index 00000000..e74d649d --- /dev/null +++ b/plugin/query_context.go @@ -0,0 +1,24 @@ +package plugin + +import ( + "github.com/turbot/steampipe-plugin-sdk/grpc/proto" +) + +type QueryContext struct { + Columns []string + RawQuals map[string]*proto.Quals + Limit *int64 +} + +// NewQueryContext maps from a proto.QueryContext to a plugin.QueryContext. +// the only difference is the representation of the limit (as protobuf does not support pointers) +func NewQueryContext(p *proto.QueryContext) *QueryContext { + q := &QueryContext{ + Columns: p.Columns, + RawQuals: p.Quals, + } + if p.Limit != nil { + q.Limit = &p.Limit.Value + } + return q +} diff --git a/plugin/query_data.go b/plugin/query_data.go index 65efc7ed..8a451dfc 100644 --- a/plugin/query_data.go +++ b/plugin/query_data.go @@ -27,7 +27,7 @@ type QueryData struct { // is this a 'get' or a 'list' call FetchType fetchType // query context data passed from postgres - this includes the requested columns and the quals - QueryContext *proto.QueryContext + QueryContext *QueryContext // connection details - the connection name and any config declared in the connection config file Connection *Connection // Matrix is an array of parameter maps (MatrixItems) @@ -56,7 +56,7 @@ type QueryData struct { parentItem interface{} } -func newQueryData(queryContext *proto.QueryContext, table *Table, stream proto.WrapperPlugin_ExecuteServer, connection *Connection, matrix []map[string]interface{}, connectionManager *connection_manager.Manager) *QueryData { +func newQueryData(queryContext *QueryContext, table *Table, stream proto.WrapperPlugin_ExecuteServer, connection *Connection, matrix []map[string]interface{}, connectionManager *connection_manager.Manager) *QueryData { d := &QueryData{ ConnectionManager: connectionManager, Table: table, @@ -183,7 +183,7 @@ func (d *QueryData) populateQualValueMap(table *Table) { } // for count(*) queries, there will be no columns - add in 1 column so that we have some data to return -func ensureColumns(queryContext *proto.QueryContext, table *Table) { +func ensureColumns(queryContext *QueryContext, table *Table) { if len(queryContext.Columns) != 0 { return } @@ -379,7 +379,7 @@ func (d *QueryData) waitForRowsToComplete(rowWg *sync.WaitGroup, rowChan chan *p // is there a single '=' qual for this column func (d *QueryData) singleEqualsQual(column string) (*proto.Qual, bool) { - quals, ok := d.QueryContext.Quals[column] + quals, ok := d.QueryContext.RawQuals[column] if !ok { return nil, false } diff --git a/plugin/table_fetch.go b/plugin/table_fetch.go index d4a7fd1b..7a0867fd 100644 --- a/plugin/table_fetch.go +++ b/plugin/table_fetch.go @@ -54,7 +54,7 @@ func (t *Table) fetchItems(ctx context.Context, queryData *QueryData) error { return t.executeGetCall(ctx, queryData) } if t.List == nil { - log.Printf("[WARN] query is not a get call, but no list call is defined, quals: %v", grpc.QualMapToString(queryData.QueryContext.Quals)) + log.Printf("[WARN] query is not a get call, but no list call is defined, quals: %v", grpc.QualMapToString(queryData.QueryContext.RawQuals)) panic("query is not a get call, but no list call is defined") }