From 71714aa65ed3244a0f2c88ec6975c9f5cbcbd02f Mon Sep 17 00:00:00 2001 From: "hilke.tillmann@gmail.com" Date: Fri, 21 May 2021 10:11:20 +0200 Subject: [PATCH 1/2] translated extra points into english --- doko/match/evaluation.go | 4 ++-- doko/match/extrapoints.go | 16 ++++++++-------- doko/match/match_test.go | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doko/match/evaluation.go b/doko/match/evaluation.go index a368a7e..10c6c4f 100644 --- a/doko/match/evaluation.go +++ b/doko/match/evaluation.go @@ -63,9 +63,9 @@ func PointsByPlayer(eval *GameEvaluation, mode game.Mode) [game.NumPlayers]int { } const ( - Karlchen ExtraPointType = iota + Charlie ExtraPointType = iota Doppelkopf - FuchsGefangen + FoxCaught ) func countReScoreAndTricks(g *game.Game) (int, int) { diff --git a/doko/match/extrapoints.go b/doko/match/extrapoints.go index 0343233..4129bce 100644 --- a/doko/match/extrapoints.go +++ b/doko/match/extrapoints.go @@ -18,13 +18,13 @@ func findExtraPoints(g *game.Game) (ans []ExtraPoint) { if !extraPointsApply(g.Mode.Type()) { return } - ans = append(ans, doppelkoepfe(g)...) - ans = append(ans, fuechse(g)...) - ans = append(ans, karlchen(g)...) + ans = append(ans, doppelkopfs(g)...) + ans = append(ans, foxesCaught(g)...) + ans = append(ans, charlies(g)...) return } -func doppelkoepfe(game *game.Game) []ExtraPoint { +func doppelkopfs(game *game.Game) []ExtraPoint { var ans []ExtraPoint for i, trick := range game.CompleteTricks { if trick.Score() >= 40 { @@ -35,22 +35,22 @@ func doppelkoepfe(game *game.Game) []ExtraPoint { return ans } -func fuechse(g *game.Game) []ExtraPoint { +func foxesCaught(g *game.Game) []ExtraPoint { var ans []ExtraPoint for i, trick := range g.CompleteTricks { for _, player := range game.Players() { if trick.CardsOf[player] == game.DiamondsA && g.Mode.PartyOf(player) != g.Mode.PartyOf(trick.Winner) { - ans = append(ans, ExtraPoint{FuchsGefangen, trick.Winner, i}) + ans = append(ans, ExtraPoint{FoxCaught, trick.Winner, i}) } } } return ans } -func karlchen(g *game.Game) []ExtraPoint { +func charlies(g *game.Game) []ExtraPoint { lastTrick := g.CompleteTricks[game.NumTricks-1] if lastTrick.CardsOf[lastTrick.Winner] == game.ClubsJ { - ans := [1]ExtraPoint{{Karlchen, lastTrick.Winner, game.NumTricks - 1}} + ans := [1]ExtraPoint{{Charlie, lastTrick.Winner, game.NumTricks - 1}} return ans[:] } return []ExtraPoint{} diff --git a/doko/match/match_test.go b/doko/match/match_test.go index 7824489..29d078f 100644 --- a/doko/match/match_test.go +++ b/doko/match/match_test.go @@ -134,7 +134,7 @@ func TestSampleMatch(t *testing.T) { assert.Equal(t, 134, result.TrickScoreRe) assert.ElementsMatch(t, [2]GamePoint{{Gewonnen, 1}, {ReAngesagt, 2}}, result.GamePoints) assert.Equal(t, 5, result.TotalValue) - assert.ElementsMatch(t, [2]ExtraPoint{{Doppelkopf, Player3, 1}, {Karlchen, Player1, 11}}, result.ExtraPoints) + assert.ElementsMatch(t, [2]ExtraPoint{{Doppelkopf, Player3, 1}, {Charlie, Player1, 11}}, result.ExtraPoints) points := PointsByPlayer(&result, match.Mode()) assert.Equal(t, 5, points[Player1]) assert.Equal(t, 5, points[Player2]) @@ -148,4 +148,4 @@ func TestMatch_PlayCard_InAuction(t *testing.T) { match := NewMatch(Player1, cards) ok := match.PlayCard(Player1, cards[Player1][0]) assert.False(t, ok) -} \ No newline at end of file +} From 020764417e63549cb383bc13d64d6beb479239c4 Mon Sep 17 00:00:00 2001 From: Hilke Date: Fri, 21 May 2021 22:46:46 +0200 Subject: [PATCH 2/2] added message for scored extra points --- api/karlchen.pb.go | 845 ++++++++++++++------------ api/karlchen.proto | 7 + client/implementations/bot.go | 34 +- client/implementations/interactive.go | 20 +- doko/match/extrapoints.go | 43 +- server/pbconv/from_pb.go | 13 + server/pbconv/to_pb.go | 13 + server/server.go | 14 +- server/tables/data.go | 4 + 9 files changed, 585 insertions(+), 408 deletions(-) diff --git a/api/karlchen.pb.go b/api/karlchen.pb.go index 9b91f84..dbcf1b0 100644 --- a/api/karlchen.pb.go +++ b/api/karlchen.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.16.0 +// protoc v3.15.2 // source: api/karlchen.proto package api @@ -283,6 +283,55 @@ func (Rank) EnumDescriptor() ([]byte, []int) { return file_api_karlchen_proto_rawDescGZIP(), []int{4} } +type TrickEvent int32 + +const ( + TrickEvent_FOXCAUGHT TrickEvent = 0 + TrickEvent_DOPPELKOPFSCORED TrickEvent = 1 + TrickEvent_CHARLIESCORED TrickEvent = 2 +) + +// Enum value maps for TrickEvent. +var ( + TrickEvent_name = map[int32]string{ + 0: "FOXCAUGHT", + 1: "DOPPELKOPFSCORED", + 2: "CHARLIESCORED", + } + TrickEvent_value = map[string]int32{ + "FOXCAUGHT": 0, + "DOPPELKOPFSCORED": 1, + "CHARLIESCORED": 2, + } +) + +func (x TrickEvent) Enum() *TrickEvent { + p := new(TrickEvent) + *p = x + return p +} + +func (x TrickEvent) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TrickEvent) Descriptor() protoreflect.EnumDescriptor { + return file_api_karlchen_proto_enumTypes[5].Descriptor() +} + +func (TrickEvent) Type() protoreflect.EnumType { + return &file_api_karlchen_proto_enumTypes[5] +} + +func (x TrickEvent) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TrickEvent.Descriptor instead. +func (TrickEvent) EnumDescriptor() ([]byte, []int) { + return file_api_karlchen_proto_rawDescGZIP(), []int{5} +} + type Party int32 const ( @@ -313,11 +362,11 @@ func (x Party) String() string { } func (Party) Descriptor() protoreflect.EnumDescriptor { - return file_api_karlchen_proto_enumTypes[5].Descriptor() + return file_api_karlchen_proto_enumTypes[6].Descriptor() } func (Party) Type() protoreflect.EnumType { - return &file_api_karlchen_proto_enumTypes[5] + return &file_api_karlchen_proto_enumTypes[6] } func (x Party) Number() protoreflect.EnumNumber { @@ -326,7 +375,7 @@ func (x Party) Number() protoreflect.EnumNumber { // Deprecated: Use Party.Descriptor instead. func (Party) EnumDescriptor() ([]byte, []int) { - return file_api_karlchen_proto_rawDescGZIP(), []int{5} + return file_api_karlchen_proto_rawDescGZIP(), []int{6} } type BidType int32 @@ -383,11 +432,11 @@ func (x BidType) String() string { } func (BidType) Descriptor() protoreflect.EnumDescriptor { - return file_api_karlchen_proto_enumTypes[6].Descriptor() + return file_api_karlchen_proto_enumTypes[7].Descriptor() } func (BidType) Type() protoreflect.EnumType { - return &file_api_karlchen_proto_enumTypes[6] + return &file_api_karlchen_proto_enumTypes[7] } func (x BidType) Number() protoreflect.EnumNumber { @@ -396,7 +445,7 @@ func (x BidType) Number() protoreflect.EnumNumber { // Deprecated: Use BidType.Descriptor instead. func (BidType) EnumDescriptor() ([]byte, []int) { - return file_api_karlchen_proto_rawDescGZIP(), []int{6} + return file_api_karlchen_proto_rawDescGZIP(), []int{7} } type GameType int32 @@ -444,11 +493,11 @@ func (x GameType) String() string { } func (GameType) Descriptor() protoreflect.EnumDescriptor { - return file_api_karlchen_proto_enumTypes[7].Descriptor() + return file_api_karlchen_proto_enumTypes[8].Descriptor() } func (GameType) Type() protoreflect.EnumType { - return &file_api_karlchen_proto_enumTypes[7] + return &file_api_karlchen_proto_enumTypes[8] } func (x GameType) Number() protoreflect.EnumNumber { @@ -457,7 +506,7 @@ func (x GameType) Number() protoreflect.EnumNumber { // Deprecated: Use GameType.Descriptor instead. func (GameType) EnumDescriptor() ([]byte, []int) { - return file_api_karlchen_proto_rawDescGZIP(), []int{7} + return file_api_karlchen_proto_rawDescGZIP(), []int{8} } type Card struct { @@ -681,6 +730,7 @@ type PlayedCard struct { Card *Card `protobuf:"bytes,2,opt,name=card,proto3" json:"card,omitempty"` TrickWinner *PlayerValue `protobuf:"bytes,3,opt,name=trick_winner,json=trickWinner,proto3" json:"trick_winner,omitempty"` Winner *PartyValue `protobuf:"bytes,4,opt,name=winner,proto3" json:"winner,omitempty"` + TrickEvent []TrickEvent `protobuf:"varint,5,rep,packed,name=trick_event,json=trickEvent,proto3,enum=api.TrickEvent" json:"trick_event,omitempty"` } func (x *PlayedCard) Reset() { @@ -743,6 +793,13 @@ func (x *PlayedCard) GetWinner() *PartyValue { return nil } +func (x *PlayedCard) GetTrickEvent() []TrickEvent { + if x != nil { + return x.TrickEvent + } + return nil +} + type Bid struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2616,7 +2673,7 @@ var file_api_karlchen_proto_rawDesc = []byte{ 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x61, 0x6d, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, + 0x64, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, @@ -2626,280 +2683,288 @@ var file_api_karlchen_proto_rawDesc = []byte{ 0x65, 0x52, 0x0b, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x03, 0x42, 0x69, 0x64, 0x12, 0x17, - 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, 0xcf, 0x02, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x48, 0x00, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x12, 0x27, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x64, 0x65, - 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, - 0x5f, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x48, 0x00, 0x52, 0x0a, - 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x12, 0x29, 0x0a, 0x0a, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x48, 0x00, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x64, 0x42, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x09, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x7c, 0x0a, 0x0b, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x46, 0x0a, 0x0f, 0x50, 0x6c, 0x61, - 0x79, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x06, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x0b, 0x74, 0x72, 0x69, 0x63, 0x6b, + 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x74, + 0x72, 0x69, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x03, 0x42, 0x69, 0x64, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x62, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, 0xcf, 0x02, 0x0a, 0x05, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, + 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, + 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x79, + 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x48, 0x00, + 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x12, 0x29, 0x0a, 0x0a, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x48, 0x00, 0x52, 0x09, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x64, 0x42, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x09, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x09, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x7c, 0x0a, + 0x0b, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x46, 0x0a, 0x0f, 0x50, + 0x6c, 0x61, 0x79, 0x43, 0x61, 0x72, 0x64, 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, 0x1d, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, + 0x61, 0x72, 0x64, 0x22, 0x47, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x69, 0x64, 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, 0x1e, 0x0a, 0x03, + 0x62, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x12, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x57, 0x0a, 0x0e, 0x44, 0x65, + 0x63, 0x6c, 0x61, 0x72, 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, 0x1d, 0x0a, 0x04, 0x63, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x04, 0x63, 0x61, 0x72, - 0x64, 0x22, 0x47, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x69, 0x64, 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, 0x1e, 0x0a, 0x03, 0x62, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x62, 0x69, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x57, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x6c, - 0x61, 0x72, 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, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x6d, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x22, 0x44, 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, - 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6c, - 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x6f, 0x6c, 0x6f, 0x69, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x6c, 0x6f, 0x69, 0x73, 0x74, - 0x12, 0x28, 0x0a, 0x06, 0x73, 0x70, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x06, 0x73, 0x70, 0x6f, 0x75, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x6f, - 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x6f, - 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x05, 0x54, 0x72, 0x69, 0x63, 0x6b, - 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, - 0x73, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, - 0x65, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x12, 0x36, 0x0a, 0x0e, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x57, 0x69, 0x6e, - 0x6e, 0x65, 0x72, 0x22, 0xd7, 0x01, 0x0a, 0x09, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x62, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x04, 0x62, 0x69, 0x64, 0x73, 0x12, - 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x69, - 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x73, 0x12, 0x2f, 0x0a, 0x0d, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x52, 0x0c, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x0e, 0x70, - 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x18, 0x04, 0x20, + 0x6c, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, + 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3a, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x26, 0x0a, 0x06, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x0c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x04, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x6f, 0x6c, 0x6f, 0x69, 0x73, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x6c, 0x6f, 0x69, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x70, 0x6f, 0x75, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x70, 0x6f, 0x75, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x66, 0x6f, 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x66, 0x6f, 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x22, 0x8a, 0x01, 0x0a, 0x05, 0x54, 0x72, 0x69, + 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x05, 0x63, 0x61, + 0x72, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x66, + 0x6f, 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x12, 0x36, 0x0a, + 0x0e, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x57, + 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x22, 0xd7, 0x01, 0x0a, 0x09, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x04, 0x62, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x52, 0x04, 0x62, 0x69, 0x64, + 0x73, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x74, + 0x72, 0x69, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x73, 0x12, 0x2f, 0x0a, 0x0d, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x52, - 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x12, 0x1d, - 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x28, 0x0a, - 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, - 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, - 0x68, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x24, 0x0a, - 0x04, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x74, - 0x75, 0x72, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x09, 0x73, - 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x09, 0x73, 0x70, - 0x65, 0x63, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x09, 0x6f, 0x77, 0x6e, 0x5f, 0x63, - 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x43, 0x61, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x43, 0x61, 0x72, - 0x64, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x01, 0x52, 0x0c, - 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x0a, - 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x48, 0x01, 0x52, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x06, 0x0a, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x22, 0x93, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0c, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x20, - 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x4c, 0x65, 0x66, 0x74, - 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x61, 0x63, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x46, 0x61, - 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x72, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x52, 0x69, 0x67, 0x68, 0x74, 0x22, 0xcb, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, - 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x22, 0x21, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x34, 0x0a, - 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x52, 0x0a, 0x0b, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x07, 0x0a, 0x05, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x57, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x3e, 0x0a, - 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x17, - 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x40, 0x0a, - 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, + 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x12, 0x31, 0x0a, + 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x72, 0x69, 0x63, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x72, 0x69, 0x63, + 0x6b, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x54, 0x72, 0x69, 0x63, 0x6b, + 0x12, 0x1d, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, + 0x28, 0x0a, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x05, 0x63, 0x61, 0x72, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, + 0x72, 0x64, 0x52, 0x05, 0x63, 0x61, 0x72, 0x64, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x0a, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, + 0x24, 0x0a, 0x04, 0x74, 0x75, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x04, 0x74, 0x75, 0x72, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, + 0x09, 0x73, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x09, + 0x73, 0x70, 0x65, 0x63, 0x74, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x09, 0x6f, 0x77, 0x6e, + 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x73, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x77, 0x6e, 0x43, + 0x61, 0x72, 0x64, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x01, + 0x52, 0x0c, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2f, + 0x0a, 0x0a, 0x67, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x48, 0x01, 0x52, 0x09, 0x67, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x06, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x20, + 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x53, 0x65, 0x6c, 0x66, + 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x6c, 0x65, 0x66, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x4c, 0x65, + 0x66, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x61, + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x46, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x5f, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x52, 0x69, 0x67, 0x68, 0x74, 0x22, 0xcb, 0x01, 0x0a, 0x09, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, + 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x21, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0a, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, + 0x34, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x52, 0x0a, 0x0b, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x07, 0x0a, + 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x57, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, - 0x4f, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x67, 0x0a, 0x10, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x11, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x15, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x2a, 0x51, 0x0a, - 0x0f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x00, - 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, - 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x4f, 0x5f, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, 0x45, 0x10, - 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x4f, 0x5f, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x03, - 0x2a, 0x4e, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0f, - 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x4c, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, - 0x42, 0x45, 0x54, 0x57, 0x45, 0x45, 0x4e, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x02, 0x12, - 0x0f, 0x0a, 0x0b, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x03, - 0x2a, 0x31, 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x68, 0x61, 0x73, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x47, - 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, - 0x44, 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x04, 0x53, 0x75, 0x69, 0x74, 0x12, 0x0c, 0x0a, 0x08, 0x44, - 0x49, 0x41, 0x4d, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, - 0x52, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x41, 0x44, 0x45, 0x53, 0x10, - 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x55, 0x42, 0x53, 0x10, 0x03, 0x2a, 0x41, 0x0a, 0x04, - 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x49, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4a, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x45, - 0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x07, 0x0a, - 0x03, 0x54, 0x45, 0x4e, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x43, 0x45, 0x10, 0x05, 0x2a, - 0x1b, 0x0a, 0x05, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x06, 0x0a, 0x02, 0x52, 0x45, 0x10, 0x00, - 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x10, 0x01, 0x2a, 0xbf, 0x01, 0x0a, - 0x07, 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x5f, 0x42, - 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x42, - 0x49, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x4e, 0x49, - 0x4e, 0x45, 0x54, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, - 0x53, 0x49, 0x58, 0x54, 0x59, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x5f, 0x4e, 0x4f, - 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x5f, - 0x53, 0x43, 0x48, 0x57, 0x41, 0x52, 0x5a, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, - 0x54, 0x52, 0x41, 0x5f, 0x4e, 0x4f, 0x5f, 0x4e, 0x49, 0x4e, 0x45, 0x54, 0x59, 0x10, 0x06, 0x12, - 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x58, - 0x54, 0x59, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x4e, - 0x4f, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, - 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x53, 0x43, 0x48, 0x57, 0x41, 0x52, 0x5a, 0x10, 0x09, 0x2a, 0x81, - 0x01, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, - 0x4d, 0x41, 0x52, 0x52, 0x49, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, - 0x41, 0x4d, 0x4f, 0x4e, 0x44, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x02, 0x12, 0x0f, 0x0a, - 0x0b, 0x48, 0x45, 0x41, 0x52, 0x54, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x03, 0x12, 0x0f, - 0x0a, 0x0b, 0x53, 0x50, 0x41, 0x44, 0x45, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x04, 0x12, - 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x55, 0x42, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x05, 0x12, - 0x11, 0x0a, 0x0d, 0x4d, 0x45, 0x41, 0x54, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, - 0x10, 0x06, 0x32, 0xda, 0x04, 0x0a, 0x04, 0x44, 0x6f, 0x6b, 0x6f, 0x12, 0x36, 0x0a, 0x08, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, - 0x79, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, - 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, - 0x50, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, - 0x6c, 0x61, 0x79, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x22, - 0x00, 0x12, 0x2c, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x69, 0x64, 0x12, 0x14, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x69, 0x64, 0x22, 0x00, 0x12, - 0x32, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4e, 0x65, 0x78, 0x74, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x4e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x30, 0x01, - 0x12, 0x3d, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, + 0x3e, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x22, 0x4f, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x10, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x5f, 0x63, 0x6f, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x76, 0x69, + 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x11, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x15, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x2a, + 0x51, 0x0a, 0x0f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x54, 0x41, 0x42, 0x4c, 0x45, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x54, 0x41, 0x42, 0x4c, + 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x4f, 0x5f, 0x4f, 0x46, 0x46, 0x4c, 0x49, 0x4e, + 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x4f, 0x5f, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, + 0x10, 0x03, 0x2a, 0x4e, 0x0a, 0x0a, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x68, 0x61, 0x73, 0x65, + 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x4c, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x42, 0x45, 0x54, 0x57, 0x45, 0x45, 0x4e, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x53, 0x10, + 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x44, 0x45, 0x44, + 0x10, 0x03, 0x2a, 0x31, 0x0a, 0x0a, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x68, 0x61, 0x73, 0x65, + 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x55, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x47, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x4e, 0x49, 0x53, + 0x48, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x37, 0x0a, 0x04, 0x53, 0x75, 0x69, 0x74, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x49, 0x41, 0x4d, 0x4f, 0x4e, 0x44, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x48, + 0x45, 0x41, 0x52, 0x54, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x41, 0x44, 0x45, + 0x53, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x55, 0x42, 0x53, 0x10, 0x03, 0x2a, 0x41, + 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x49, 0x4e, 0x45, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, + 0x45, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x07, 0x0a, 0x03, 0x54, 0x45, 0x4e, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x43, 0x45, 0x10, + 0x05, 0x2a, 0x44, 0x0a, 0x0a, 0x54, 0x72, 0x69, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x58, 0x43, 0x41, 0x55, 0x47, 0x48, 0x54, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x44, 0x4f, 0x50, 0x50, 0x45, 0x4c, 0x4b, 0x4f, 0x50, 0x46, 0x53, 0x43, 0x4f, 0x52, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x52, 0x4c, 0x49, 0x45, 0x53, + 0x43, 0x4f, 0x52, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x1b, 0x0a, 0x05, 0x50, 0x61, 0x72, 0x74, 0x79, + 0x12, 0x06, 0x0a, 0x02, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x54, + 0x52, 0x41, 0x10, 0x01, 0x2a, 0xbf, 0x01, 0x0a, 0x07, 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x5f, 0x42, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, + 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x42, 0x49, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x4e, 0x49, 0x4e, 0x45, 0x54, 0x59, 0x10, 0x02, 0x12, 0x0f, + 0x0a, 0x0b, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x58, 0x54, 0x59, 0x10, 0x03, 0x12, + 0x10, 0x0a, 0x0c, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, 0x10, + 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x5f, 0x53, 0x43, 0x48, 0x57, 0x41, 0x52, 0x5a, 0x10, + 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x4e, 0x4f, 0x5f, 0x4e, + 0x49, 0x4e, 0x45, 0x54, 0x59, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4e, 0x54, 0x52, + 0x41, 0x5f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x58, 0x54, 0x59, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, + 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x4e, 0x4f, 0x5f, 0x54, 0x48, 0x49, 0x52, 0x54, 0x59, + 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x5f, 0x53, 0x43, 0x48, + 0x57, 0x41, 0x52, 0x5a, 0x10, 0x09, 0x2a, 0x81, 0x01, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x47, 0x41, + 0x4d, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x41, 0x52, 0x52, 0x49, 0x41, 0x47, 0x45, + 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x49, 0x41, 0x4d, 0x4f, 0x4e, 0x44, 0x53, 0x5f, 0x53, + 0x4f, 0x4c, 0x4f, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x45, 0x41, 0x52, 0x54, 0x53, 0x5f, + 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x50, 0x41, 0x44, 0x45, 0x53, + 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x55, 0x42, 0x53, + 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x45, 0x41, 0x54, 0x4c, + 0x45, 0x53, 0x53, 0x5f, 0x53, 0x4f, 0x4c, 0x4f, 0x10, 0x06, 0x32, 0xda, 0x04, 0x0a, 0x04, 0x44, + 0x6f, 0x6b, 0x6f, 0x12, 0x36, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x05, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x35, 0x0a, + 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x72, 0x64, + 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x43, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x08, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x42, 0x69, 0x64, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x42, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x42, 0x69, 0x64, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x65, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x0c, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3d, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x42, - 0x06, 0x5a, 0x04, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2f, 0x61, 0x70, 0x69, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2914,7 +2979,7 @@ func file_api_karlchen_proto_rawDescGZIP() []byte { return file_api_karlchen_proto_rawDescData } -var file_api_karlchen_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_api_karlchen_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_api_karlchen_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_api_karlchen_proto_goTypes = []interface{}{ (MemberEventType)(0), // 0: api.MemberEventType @@ -2922,116 +2987,118 @@ var file_api_karlchen_proto_goTypes = []interface{}{ (MatchPhase)(0), // 2: api.MatchPhase (Suit)(0), // 3: api.Suit (Rank)(0), // 4: api.Rank - (Party)(0), // 5: api.Party - (BidType)(0), // 6: api.BidType - (GameType)(0), // 7: api.GameType - (*Card)(nil), // 8: api.Card - (*PlayerValue)(nil), // 9: api.PlayerValue - (*PartyValue)(nil), // 10: api.PartyValue - (*Declaration)(nil), // 11: api.Declaration - (*PlayedCard)(nil), // 12: api.PlayedCard - (*Bid)(nil), // 13: api.Bid - (*Event)(nil), // 14: api.Event - (*UserState)(nil), // 15: api.UserState - (*MemberEvent)(nil), // 16: api.MemberEvent - (*PlayCardRequest)(nil), // 17: api.PlayCardRequest - (*PlaceBidRequest)(nil), // 18: api.PlaceBidRequest - (*CreateTableRequest)(nil), // 19: api.CreateTableRequest - (*DeclareRequest)(nil), // 20: api.DeclareRequest - (*ListTablesRequest)(nil), // 21: api.ListTablesRequest - (*ListTablesResult)(nil), // 22: api.ListTablesResult - (*AuctionState)(nil), // 23: api.AuctionState - (*Mode)(nil), // 24: api.Mode - (*Trick)(nil), // 25: api.Trick - (*GameState)(nil), // 26: api.GameState - (*Cards)(nil), // 27: api.Cards - (*MatchState)(nil), // 28: api.MatchState - (*Players)(nil), // 29: api.Players - (*TableData)(nil), // 30: api.TableData - (*Timestamp)(nil), // 31: api.Timestamp - (*TableState)(nil), // 32: api.TableState - (*TableMember)(nil), // 33: api.TableMember - (*Empty)(nil), // 34: api.Empty - (*RegisterRequest)(nil), // 35: api.RegisterRequest - (*RegisterReply)(nil), // 36: api.RegisterReply - (*LoginRequest)(nil), // 37: api.LoginRequest - (*LoginReply)(nil), // 38: api.LoginReply - (*JoinTableRequest)(nil), // 39: api.JoinTableRequest - (*StartTableRequest)(nil), // 40: api.StartTableRequest - (*StartNextMatchRequest)(nil), // 41: api.StartNextMatchRequest + (TrickEvent)(0), // 5: api.TrickEvent + (Party)(0), // 6: api.Party + (BidType)(0), // 7: api.BidType + (GameType)(0), // 8: api.GameType + (*Card)(nil), // 9: api.Card + (*PlayerValue)(nil), // 10: api.PlayerValue + (*PartyValue)(nil), // 11: api.PartyValue + (*Declaration)(nil), // 12: api.Declaration + (*PlayedCard)(nil), // 13: api.PlayedCard + (*Bid)(nil), // 14: api.Bid + (*Event)(nil), // 15: api.Event + (*UserState)(nil), // 16: api.UserState + (*MemberEvent)(nil), // 17: api.MemberEvent + (*PlayCardRequest)(nil), // 18: api.PlayCardRequest + (*PlaceBidRequest)(nil), // 19: api.PlaceBidRequest + (*CreateTableRequest)(nil), // 20: api.CreateTableRequest + (*DeclareRequest)(nil), // 21: api.DeclareRequest + (*ListTablesRequest)(nil), // 22: api.ListTablesRequest + (*ListTablesResult)(nil), // 23: api.ListTablesResult + (*AuctionState)(nil), // 24: api.AuctionState + (*Mode)(nil), // 25: api.Mode + (*Trick)(nil), // 26: api.Trick + (*GameState)(nil), // 27: api.GameState + (*Cards)(nil), // 28: api.Cards + (*MatchState)(nil), // 29: api.MatchState + (*Players)(nil), // 30: api.Players + (*TableData)(nil), // 31: api.TableData + (*Timestamp)(nil), // 32: api.Timestamp + (*TableState)(nil), // 33: api.TableState + (*TableMember)(nil), // 34: api.TableMember + (*Empty)(nil), // 35: api.Empty + (*RegisterRequest)(nil), // 36: api.RegisterRequest + (*RegisterReply)(nil), // 37: api.RegisterReply + (*LoginRequest)(nil), // 38: api.LoginRequest + (*LoginReply)(nil), // 39: api.LoginReply + (*JoinTableRequest)(nil), // 40: api.JoinTableRequest + (*StartTableRequest)(nil), // 41: api.StartTableRequest + (*StartNextMatchRequest)(nil), // 42: api.StartNextMatchRequest } var file_api_karlchen_proto_depIdxs = []int32{ 3, // 0: api.Card.suit:type_name -> api.Suit 4, // 1: api.Card.rank:type_name -> api.Rank - 5, // 2: api.PartyValue.party:type_name -> api.Party - 24, // 3: api.Declaration.definedGameMode:type_name -> api.Mode - 8, // 4: api.PlayedCard.card:type_name -> api.Card - 9, // 5: api.PlayedCard.trick_winner:type_name -> api.PlayerValue - 10, // 6: api.PlayedCard.winner:type_name -> api.PartyValue - 6, // 7: api.Bid.bid:type_name -> api.BidType - 15, // 8: api.Event.welcome:type_name -> api.UserState - 28, // 9: api.Event.start:type_name -> api.MatchState - 11, // 10: api.Event.declared:type_name -> api.Declaration - 12, // 11: api.Event.played_card:type_name -> api.PlayedCard - 13, // 12: api.Event.placed_bid:type_name -> api.Bid - 16, // 13: api.Event.member:type_name -> api.MemberEvent - 30, // 14: api.Event.new_table:type_name -> api.TableData - 32, // 15: api.UserState.currentTable:type_name -> api.TableState - 0, // 16: api.MemberEvent.type:type_name -> api.MemberEventType - 8, // 17: api.PlayCardRequest.card:type_name -> api.Card - 6, // 18: api.PlaceBidRequest.bid:type_name -> api.BidType - 7, // 19: api.DeclareRequest.declaration:type_name -> api.GameType - 30, // 20: api.ListTablesResult.tables:type_name -> api.TableData - 11, // 21: api.AuctionState.declarations:type_name -> api.Declaration - 7, // 22: api.Mode.type:type_name -> api.GameType - 9, // 23: api.Mode.soloist:type_name -> api.PlayerValue - 9, // 24: api.Mode.spouse:type_name -> api.PlayerValue - 8, // 25: api.Trick.cards:type_name -> api.Card - 9, // 26: api.Trick.user_id_winner:type_name -> api.PlayerValue - 13, // 27: api.GameState.bids:type_name -> api.Bid - 25, // 28: api.GameState.current_trick:type_name -> api.Trick - 25, // 29: api.GameState.previous_trick:type_name -> api.Trick - 24, // 30: api.GameState.mode:type_name -> api.Mode - 8, // 31: api.Cards.cards:type_name -> api.Card - 2, // 32: api.MatchState.phase:type_name -> api.MatchPhase - 9, // 33: api.MatchState.turn:type_name -> api.PlayerValue - 29, // 34: api.MatchState.players:type_name -> api.Players - 34, // 35: api.MatchState.spectator:type_name -> api.Empty - 27, // 36: api.MatchState.own_cards:type_name -> api.Cards - 23, // 37: api.MatchState.auction_state:type_name -> api.AuctionState - 26, // 38: api.MatchState.game_state:type_name -> api.GameState - 33, // 39: api.TableData.members:type_name -> api.TableMember - 31, // 40: api.TableData.created:type_name -> api.Timestamp - 1, // 41: api.TableState.phase:type_name -> api.TablePhase - 28, // 42: api.TableState.current_match:type_name -> api.MatchState - 30, // 43: api.TableState.data:type_name -> api.TableData - 35, // 44: api.Doko.Register:input_type -> api.RegisterRequest - 37, // 45: api.Doko.Login:input_type -> api.LoginRequest - 19, // 46: api.Doko.CreateTable:input_type -> api.CreateTableRequest - 40, // 47: api.Doko.StartTable:input_type -> api.StartTableRequest - 39, // 48: api.Doko.JoinTable:input_type -> api.JoinTableRequest - 17, // 49: api.Doko.PlayCard:input_type -> api.PlayCardRequest - 18, // 50: api.Doko.PlaceBid:input_type -> api.PlaceBidRequest - 20, // 51: api.Doko.Declare:input_type -> api.DeclareRequest - 41, // 52: api.Doko.StartNextMatch:input_type -> api.StartNextMatchRequest - 34, // 53: api.Doko.StartSession:input_type -> api.Empty - 21, // 54: api.Doko.ListTables:input_type -> api.ListTablesRequest - 36, // 55: api.Doko.Register:output_type -> api.RegisterReply - 38, // 56: api.Doko.Login:output_type -> api.LoginReply - 30, // 57: api.Doko.CreateTable:output_type -> api.TableData - 28, // 58: api.Doko.StartTable:output_type -> api.MatchState - 32, // 59: api.Doko.JoinTable:output_type -> api.TableState - 12, // 60: api.Doko.PlayCard:output_type -> api.PlayedCard - 13, // 61: api.Doko.PlaceBid:output_type -> api.Bid - 11, // 62: api.Doko.Declare:output_type -> api.Declaration - 28, // 63: api.Doko.StartNextMatch:output_type -> api.MatchState - 14, // 64: api.Doko.StartSession:output_type -> api.Event - 22, // 65: api.Doko.ListTables:output_type -> api.ListTablesResult - 55, // [55:66] is the sub-list for method output_type - 44, // [44:55] is the sub-list for method input_type - 44, // [44:44] is the sub-list for extension type_name - 44, // [44:44] is the sub-list for extension extendee - 0, // [0:44] is the sub-list for field type_name + 6, // 2: api.PartyValue.party:type_name -> api.Party + 25, // 3: api.Declaration.definedGameMode:type_name -> api.Mode + 9, // 4: api.PlayedCard.card:type_name -> api.Card + 10, // 5: api.PlayedCard.trick_winner:type_name -> api.PlayerValue + 11, // 6: api.PlayedCard.winner:type_name -> api.PartyValue + 5, // 7: api.PlayedCard.trick_event:type_name -> api.TrickEvent + 7, // 8: api.Bid.bid:type_name -> api.BidType + 16, // 9: api.Event.welcome:type_name -> api.UserState + 29, // 10: api.Event.start:type_name -> api.MatchState + 12, // 11: api.Event.declared:type_name -> api.Declaration + 13, // 12: api.Event.played_card:type_name -> api.PlayedCard + 14, // 13: api.Event.placed_bid:type_name -> api.Bid + 17, // 14: api.Event.member:type_name -> api.MemberEvent + 31, // 15: api.Event.new_table:type_name -> api.TableData + 33, // 16: api.UserState.currentTable:type_name -> api.TableState + 0, // 17: api.MemberEvent.type:type_name -> api.MemberEventType + 9, // 18: api.PlayCardRequest.card:type_name -> api.Card + 7, // 19: api.PlaceBidRequest.bid:type_name -> api.BidType + 8, // 20: api.DeclareRequest.declaration:type_name -> api.GameType + 31, // 21: api.ListTablesResult.tables:type_name -> api.TableData + 12, // 22: api.AuctionState.declarations:type_name -> api.Declaration + 8, // 23: api.Mode.type:type_name -> api.GameType + 10, // 24: api.Mode.soloist:type_name -> api.PlayerValue + 10, // 25: api.Mode.spouse:type_name -> api.PlayerValue + 9, // 26: api.Trick.cards:type_name -> api.Card + 10, // 27: api.Trick.user_id_winner:type_name -> api.PlayerValue + 14, // 28: api.GameState.bids:type_name -> api.Bid + 26, // 29: api.GameState.current_trick:type_name -> api.Trick + 26, // 30: api.GameState.previous_trick:type_name -> api.Trick + 25, // 31: api.GameState.mode:type_name -> api.Mode + 9, // 32: api.Cards.cards:type_name -> api.Card + 2, // 33: api.MatchState.phase:type_name -> api.MatchPhase + 10, // 34: api.MatchState.turn:type_name -> api.PlayerValue + 30, // 35: api.MatchState.players:type_name -> api.Players + 35, // 36: api.MatchState.spectator:type_name -> api.Empty + 28, // 37: api.MatchState.own_cards:type_name -> api.Cards + 24, // 38: api.MatchState.auction_state:type_name -> api.AuctionState + 27, // 39: api.MatchState.game_state:type_name -> api.GameState + 34, // 40: api.TableData.members:type_name -> api.TableMember + 32, // 41: api.TableData.created:type_name -> api.Timestamp + 1, // 42: api.TableState.phase:type_name -> api.TablePhase + 29, // 43: api.TableState.current_match:type_name -> api.MatchState + 31, // 44: api.TableState.data:type_name -> api.TableData + 36, // 45: api.Doko.Register:input_type -> api.RegisterRequest + 38, // 46: api.Doko.Login:input_type -> api.LoginRequest + 20, // 47: api.Doko.CreateTable:input_type -> api.CreateTableRequest + 41, // 48: api.Doko.StartTable:input_type -> api.StartTableRequest + 40, // 49: api.Doko.JoinTable:input_type -> api.JoinTableRequest + 18, // 50: api.Doko.PlayCard:input_type -> api.PlayCardRequest + 19, // 51: api.Doko.PlaceBid:input_type -> api.PlaceBidRequest + 21, // 52: api.Doko.Declare:input_type -> api.DeclareRequest + 42, // 53: api.Doko.StartNextMatch:input_type -> api.StartNextMatchRequest + 35, // 54: api.Doko.StartSession:input_type -> api.Empty + 22, // 55: api.Doko.ListTables:input_type -> api.ListTablesRequest + 37, // 56: api.Doko.Register:output_type -> api.RegisterReply + 39, // 57: api.Doko.Login:output_type -> api.LoginReply + 31, // 58: api.Doko.CreateTable:output_type -> api.TableData + 29, // 59: api.Doko.StartTable:output_type -> api.MatchState + 33, // 60: api.Doko.JoinTable:output_type -> api.TableState + 13, // 61: api.Doko.PlayCard:output_type -> api.PlayedCard + 14, // 62: api.Doko.PlaceBid:output_type -> api.Bid + 12, // 63: api.Doko.Declare:output_type -> api.Declaration + 29, // 64: api.Doko.StartNextMatch:output_type -> api.MatchState + 15, // 65: api.Doko.StartSession:output_type -> api.Event + 23, // 66: api.Doko.ListTables:output_type -> api.ListTablesResult + 56, // [56:67] is the sub-list for method output_type + 45, // [45:56] is the sub-list for method input_type + 45, // [45:45] is the sub-list for extension type_name + 45, // [45:45] is the sub-list for extension extendee + 0, // [0:45] is the sub-list for field type_name } func init() { file_api_karlchen_proto_init() } @@ -3473,7 +3540,7 @@ func file_api_karlchen_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_karlchen_proto_rawDesc, - NumEnums: 8, + NumEnums: 9, NumMessages: 34, NumExtensions: 0, NumServices: 1, diff --git a/api/karlchen.proto b/api/karlchen.proto index be34c39..713c6d5 100644 --- a/api/karlchen.proto +++ b/api/karlchen.proto @@ -61,6 +61,7 @@ message PlayedCard { Card card = 2; PlayerValue trick_winner = 3; PartyValue winner = 4; + repeated TrickEvent trick_event = 5; } message Bid { @@ -264,6 +265,12 @@ enum Rank { } +enum TrickEvent { + FOXCAUGHT = 0; + DOPPELKOPFSCORED = 1; + CHARLIESCORED = 2; +} + enum Party { RE = 0; CONTRA = 1; diff --git a/client/implementations/bot.go b/client/implementations/bot.go index b41e071..352fd77 100644 --- a/client/implementations/bot.go +++ b/client/implementations/bot.go @@ -1,14 +1,15 @@ package implementations import ( - "fmt" - pb "github.com/supermihi/karlchencloud/api" - "github.com/supermihi/karlchencloud/client" - "github.com/supermihi/karlchencloud/doko/game" - "github.com/supermihi/karlchencloud/doko/match" - "os" - "strings" - "time" + "fmt" + "os" + "strings" + "time" + + pb "github.com/supermihi/karlchencloud/api" + "github.com/supermihi/karlchencloud/client" + "github.com/supermihi/karlchencloud/doko/game" + "github.com/supermihi/karlchencloud/doko/match" ) const superSecretBotPassword = "123" @@ -139,7 +140,7 @@ func (h *BotClient) OnMyTurnGame() { } } if cardIndex == -1 { - cardIndex = 0 // no matchnig card -> can play anything + cardIndex = 0 // no matching card -> can play anything } time.Sleep(h.delay) err := h.PlayCard(cardIndex) @@ -159,7 +160,20 @@ func (h *BotClient) OnMemberJoin(_ string, _ string) { } } -func (h *BotClient) OnPlayedCard(_ *pb.PlayedCard) { +func (h *BotClient) OnPlayedCard(play *pb.PlayedCard) { + if play.TrickWinner != nil && play.TrickWinner.UserId == h.User().Id { + h.Logf("I won the trick!") + for _, extraPoint := range play.TrickEvent { + switch pb.TrickEvent(extraPoint) { + case pb.TrickEvent_FOXCAUGHT: + h.Logf("and caught a fox!") + case pb.TrickEvent_DOPPELKOPFSCORED: + h.Logf("and scored a Doppelkopf!") + case pb.TrickEvent_CHARLIESCORED: + h.Logf("and my Charlie Miller won the last trick of the match!") + } + } + } if h.Match().Phase == match.MatchFinished && h.isOwner { h.Logf("I'm the owner, starting next match ...") time.Sleep(h.delay) diff --git a/client/implementations/interactive.go b/client/implementations/interactive.go index f5d5425..f3f05ba 100644 --- a/client/implementations/interactive.go +++ b/client/implementations/interactive.go @@ -2,14 +2,15 @@ package implementations import ( "bufio" + "log" + "os" + "strconv" + "github.com/eiannone/keyboard" pb "github.com/supermihi/karlchencloud/api" "github.com/supermihi/karlchencloud/client" "github.com/supermihi/karlchencloud/doko/game" "github.com/supermihi/karlchencloud/server/pbconv" - "log" - "os" - "strconv" ) type CliHandler struct { @@ -81,7 +82,18 @@ func (h *CliHandler) OnPlayedCard(ev *pb.PlayedCard) { h.Logf("%v played %v", h.Table().MemberNamesById[ev.UserId], pbconv.ToCard(ev.Card)) } if len(h.Match().Trick.Cards) == 0 { - h.Logf("trick finished. Winner: %s", h.Table().MemberNamesById[h.Match().Trick.Forehand]) + var winnerName = h.Table().MemberNamesById[h.Match().Trick.Forehand] + h.Logf("trick finished. Winner: %s", winnerName) + for _, extraPoint := range ev.TrickEvent { + switch pb.TrickEvent(extraPoint) { + case pb.TrickEvent_FOXCAUGHT: + h.Logf("%s caught a fox!", winnerName) + case pb.TrickEvent_DOPPELKOPFSCORED: + h.Logf("%s scored a Doppelkopf!", winnerName) + case pb.TrickEvent_CHARLIESCORED: + h.Logf("%s won with Charlie Miller the last trick of the match!", winnerName) + } + } } } diff --git a/doko/match/extrapoints.go b/doko/match/extrapoints.go index 4129bce..1e525ad 100644 --- a/doko/match/extrapoints.go +++ b/doko/match/extrapoints.go @@ -20,14 +20,36 @@ func findExtraPoints(g *game.Game) (ans []ExtraPoint) { } ans = append(ans, doppelkopfs(g)...) ans = append(ans, foxesCaught(g)...) - ans = append(ans, charlies(g)...) + ans = append(ans, charlie(g)...) return } +func EventsOccured(g *game.Game, trick *game.Trick) (ans []ExtraPointType) { + if !extraPointsApply(g.Mode.Type()) { + return + } + if scoresDoppelkopf(trick) { + ans = append(ans, Doppelkopf) + } + for _, player := range game.Players() { + if maybeFoxCaught(player, trick) { + ans = append(ans, FoxCaught) + } + } + if charlieWinLastTrick(g) { + ans = append(ans, Charlie) + } + return ans +} + +func scoresDoppelkopf(trick *game.Trick) bool { + return trick.Score() >= 40 +} + func doppelkopfs(game *game.Game) []ExtraPoint { var ans []ExtraPoint for i, trick := range game.CompleteTricks { - if trick.Score() >= 40 { + if scoresDoppelkopf(&trick) { ep := ExtraPoint{Doppelkopf, trick.Winner, i} ans = append(ans, ep) } @@ -35,6 +57,11 @@ func doppelkopfs(game *game.Game) []ExtraPoint { return ans } +//logic without party information +func maybeFoxCaught(player game.Player, trick *game.Trick) bool { + return trick.CardsOf[player] == game.DiamondsA && player != trick.Winner +} + func foxesCaught(g *game.Game) []ExtraPoint { var ans []ExtraPoint for i, trick := range g.CompleteTricks { @@ -47,9 +74,17 @@ func foxesCaught(g *game.Game) []ExtraPoint { return ans } -func charlies(g *game.Game) []ExtraPoint { +func charlieWinLastTrick(g *game.Game) bool { + if !g.IsFinished() { + return false + } + lastTrick := g.CompleteTricks[game.NumTricks-1] + return lastTrick.CardsOf[lastTrick.Winner] == game.ClubsJ +} + +func charlie(g *game.Game) []ExtraPoint { lastTrick := g.CompleteTricks[game.NumTricks-1] - if lastTrick.CardsOf[lastTrick.Winner] == game.ClubsJ { + if charlieWinLastTrick(g) { ans := [1]ExtraPoint{{Charlie, lastTrick.Winner, game.NumTricks - 1}} return ans[:] } diff --git a/server/pbconv/from_pb.go b/server/pbconv/from_pb.go index 4f85dc8..f741985 100644 --- a/server/pbconv/from_pb.go +++ b/server/pbconv/from_pb.go @@ -2,6 +2,7 @@ package pbconv import ( "fmt" + pb "github.com/supermihi/karlchencloud/api" "github.com/supermihi/karlchencloud/doko/game" "github.com/supermihi/karlchencloud/doko/match" @@ -110,3 +111,15 @@ func ToMatchPhase(p pb.MatchPhase) match.Phase { } panic(fmt.Sprintf("unknown match phase: %v", p)) } + +func ToExtraPointType(t pb.TrickEvent) match.ExtraPointType { + switch t { + case pb.TrickEvent_FOXCAUGHT: + return match.FoxCaught; + case pb.TrickEvent_DOPPELKOPFSCORED: + return match.Doppelkopf; + case pb.TrickEvent_CHARLIESCORED: + return match.Charlie; + } + panic(fmt.Sprintf("not a trick event type: %s", t)) +} diff --git a/server/pbconv/to_pb.go b/server/pbconv/to_pb.go index b378b10..41182d1 100644 --- a/server/pbconv/to_pb.go +++ b/server/pbconv/to_pb.go @@ -2,6 +2,7 @@ package pbconv import ( "fmt" + pb "github.com/supermihi/karlchencloud/api" "github.com/supermihi/karlchencloud/doko/game" "github.com/supermihi/karlchencloud/doko/match" @@ -249,3 +250,15 @@ func addDetails(state *pb.MatchState, md *t.MatchData) { panic(fmt.Sprintf("ToPbMatchState called with invalid match phase %v", md.Phase)) } } + +func ToPbTrickEvent(e match.ExtraPointType) pb.TrickEvent { + switch e { + case match.FoxCaught: + return pb.TrickEvent_FOXCAUGHT; + case match.Doppelkopf: + return pb.TrickEvent_DOPPELKOPFSCORED; + case match.Charlie: + return pb.TrickEvent_CHARLIESCORED; + } + panic(fmt.Sprintf("not a extra point type: %v", e)) +} diff --git a/server/server.go b/server/server.go index 7ee2327..e43fa57 100644 --- a/server/server.go +++ b/server/server.go @@ -2,6 +2,8 @@ package server import ( "context" + "log" + pb "github.com/supermihi/karlchencloud/api" "github.com/supermihi/karlchencloud/doko/game" "github.com/supermihi/karlchencloud/doko/match" @@ -12,7 +14,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "log" ) type dokoserver struct { @@ -256,6 +257,17 @@ func (s *dokoserver) PlayCard(ctx context.Context, req *pb.PlayCardRequest) (*pb if m.CurrentTrick != nil && m.CurrentTrick.NumCardsPlayed() == 0 { card.TrickWinner = &pb.PlayerValue{UserId: table.Players[m.PreviousTrick.Winner].String()} log.Printf("trick finished. winner: %s", table.Players[m.PreviousTrick.Winner].String()) + for _, event := range m.TrickEvent { + card.TrickEvent = append(card.TrickEvent, pbconv.ToPbTrickEvent(event)) + switch match.ExtraPointType(event) { + case match.FoxCaught: + log.Printf("a fox had been caught!") + case match.Doppelkopf: + log.Printf("Doppelkopf scored!") + case match.Charlie: + log.Printf("Charlie Miller won the last trick of the match!") + } + } } if m.Phase == match.MatchFinished { card.Winner = &pb.PartyValue{} diff --git a/server/tables/data.go b/server/tables/data.go index 95628e0..2ef0cb6 100644 --- a/server/tables/data.go +++ b/server/tables/data.go @@ -57,6 +57,7 @@ type MatchData struct { PreviousTrick *game.Trick Mode game.Mode Evaluation *match.GameEvaluation + TrickEvent []match.ExtraPointType } func NewMatchData(tm *TableMatch) *MatchData { @@ -84,6 +85,9 @@ func NewMatchData(tm *TableMatch) *MatchData { ans.CurrentTrick = &tmp ans.Mode = g.Mode ans.Cards = g.HandCards + if ans.CurrentTrick.NumCardsPlayed() == 0 && ans.PreviousTrick != nil { + ans.TrickEvent = match.EventsOccured(g, ans.PreviousTrick) + } case match.InAuction: ans.Cards = tm.Match.DealtCards() case match.MatchFinished: