diff --git a/CHANGELOG.md b/CHANGELOG.md index 7016fd1..b9152d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] v0.3.3 +## 12 Feb 2025 + +### Changed + +- Changed config file path for tests +- Config new field for fighters data path + +## 11 Feb 2025 + +### Add + +- CreateFightResult method + +### Changed + +- SearchEvents method +- SetFightResult method now called SetFightIsDone +- FightResultRequest and corresponding protobuf model +- DB init files +- Swagger doc + ## 10 Feb 2025 ### Added diff --git a/api/pickfighter.proto b/api/pickfighter.proto index 45fbcc8..f8e4bc3 100644 --- a/api/pickfighter.proto +++ b/api/pickfighter.proto @@ -156,6 +156,10 @@ message FightResultRequest { int32 fightId = 1; int32 winnerId = 2; bool notContest = 3; + bool isCanceled = 4; + bool isDraw = 5; + string method = 6; + int32 round = 7; } message FightResultResponse { diff --git a/documentation/openapi/yaml/swagger.yaml b/documentation/openapi/yaml/swagger.yaml index 3bb9334..2059df2 100644 --- a/documentation/openapi/yaml/swagger.yaml +++ b/documentation/openapi/yaml/swagger.yaml @@ -464,6 +464,9 @@ components: cont_contest: type: boolean example: false + is_draw: + type: boolean + example: false AddResultResponse: type: object properties: diff --git a/events/internal/controller/event/controller.go b/events/internal/controller/event/controller.go index 7336c61..b712427 100644 --- a/events/internal/controller/event/controller.go +++ b/events/internal/controller/event/controller.go @@ -6,7 +6,6 @@ import ( "fmt" "time" - "github.com/DoRightt/pickfighter-server/events/pkg/model" eventmodel "github.com/DoRightt/pickfighter-server/events/pkg/model" "github.com/DoRightt/pickfighter-server/events/pkg/version" "github.com/DoRightt/pickfighter-server/pkg/pgxs" @@ -27,7 +26,8 @@ type eventRepository interface { TxCreateBet(ctx context.Context, tx pgx.Tx, req *eventmodel.Bet) (int32, error) SearchBetsCount(ctx context.Context, userId int32) (int32, error) SearchBets(ctx context.Context, userId int32) ([]*eventmodel.Bet, error) - SetFightResult(ctx context.Context, tx pgx.Tx, fr *eventmodel.FightResultRequest) error + CreateFightResult(ctx context.Context, tx pgx.Tx, req *eventmodel.FightResultRequest) error + SetFightIsDone(ctx context.Context, tx pgx.Tx, fight_id int) error GetEventId(ctx context.Context, tx pgx.Tx, fightId int32) (int32, error) GetUndoneFightsCount(ctx context.Context, tx pgx.Tx, eventId int32) (int, error) SetEventDone(ctx context.Context, tx pgx.Tx, eventId int32) error @@ -48,8 +48,8 @@ func New(repo eventRepository) *Controller { // HealthCheck returns the current health status of the application. // It includes information such as the app version, start time, uptime, // and a message indicating the application's health. -func (c *Controller) HealthCheck() *model.HealthStatus { - return &model.HealthStatus{ +func (c *Controller) HealthCheck() *eventmodel.HealthStatus { + return &eventmodel.HealthStatus{ AppDevVersion: version.DevVersion, AppName: version.Name, Timestamp: time.Now().Format(time.RFC1123), diff --git a/events/internal/controller/event/event.go b/events/internal/controller/event/event.go index b601c0c..6d0fe5f 100644 --- a/events/internal/controller/event/event.go +++ b/events/internal/controller/event/event.go @@ -48,6 +48,7 @@ func (c *Controller) GetEvents(ctx context.Context) (*model.EventsResponse, erro return nil, intErr } + if count == 0 { intErr := internalErr.NewDefault(internalErr.EventsNoRows, 902) return nil, intErr diff --git a/events/internal/controller/event/event_utils.go b/events/internal/controller/event/event_utils.go index 378cc97..2c01532 100644 --- a/events/internal/controller/event/event_utils.go +++ b/events/internal/controller/event/event_utils.go @@ -45,8 +45,6 @@ func (c *Controller) handleEventCreation(ctx context.Context, tx pgx.Tx, req *ev EventId: eventId, FighterRedId: f.FighterRedId, FighterBlueId: f.FighterBlueId, - IsDone: false, - IsCanceled: false, } if err := c.repo.TxCreateEventFight(ctx, tx, fight); err != nil { diff --git a/events/internal/controller/event/result.go b/events/internal/controller/event/result.go index 5d1d9df..4835cb3 100644 --- a/events/internal/controller/event/result.go +++ b/events/internal/controller/event/result.go @@ -19,7 +19,7 @@ func (c *Controller) SetFightResult(ctx context.Context, req *model.FightResultR return 0, intErr } - err = c.repo.SetFightResult(ctx, tx, req) + err = c.repo.CreateFightResult(ctx, tx, req) if err != nil { if txErr := tx.Rollback(ctx); txErr != nil { logs.Errorf("Unable to rollback transaction: %s", txErr) @@ -28,12 +28,21 @@ func (c *Controller) SetFightResult(ctx context.Context, req *model.FightResultR return 0, intErr } + err = c.repo.SetFightIsDone(ctx, tx, int(req.FightId)) + if err != nil { + if txErr := tx.Rollback(ctx); txErr != nil { + logs.Errorf("Unable to rollback transaction: %s", txErr) + } + intErr := internalErr.New(internalErr.EventsFightResult, err, 905) + return 0, intErr + } + err = c.checkEventIsDone(ctx, tx, req.FightId) if err != nil { if txErr := tx.Rollback(ctx); txErr != nil { logs.Errorf("Unable to rollback transaction: %s", txErr) } - intErr := internalErr.New(internalErr.EventIsDone, err, 905) + intErr := internalErr.New(internalErr.EventIsDone, err, 906) return 0, intErr } diff --git a/events/internal/repository/psql/db_events.go b/events/internal/repository/psql/db_events.go index e791689..ceefdb5 100644 --- a/events/internal/repository/psql/db_events.go +++ b/events/internal/repository/psql/db_events.go @@ -84,13 +84,15 @@ func (r *Repository) SearchEvents(ctx context.Context) ([]*eventmodel.Event, err ) SELECT e.event_id, e.name, e.is_done AS is_event_done, - f.fight_id, f.is_done AS is_fight_done, f.not_contest, - f.created_at, f.fight_date, f.result, - f.fighter_red_id, f.fighter_blue_id + f.fight_id, f.is_done AS is_fight_done, f.created_at, f.fight_date, + f.fighter_red_id, f.fighter_blue_id, f.is_canceled + r.not_contest, r.is_draw FROM filtered_events e LEFT JOIN - events.fights f ON e.event_id = f.event_id` + events.fights f ON e.event_id = f.event_id + LEFT JOIN + events.fight_results r ON f.fight_id = r.fight_id` var events []*eventmodel.Event diff --git a/events/internal/repository/psql/db_fights.go b/events/internal/repository/psql/db_fights.go index 910b90f..7f7aa80 100644 --- a/events/internal/repository/psql/db_fights.go +++ b/events/internal/repository/psql/db_fights.go @@ -12,11 +12,11 @@ import ( // It returns an error if the insertion fails. func (r *Repository) TxCreateEventFight(ctx context.Context, tx pgx.Tx, f eventmodel.Fight) error { q := `INSERT INTO - events.fights(event_id, fighter_red_id, fighter_blue_id, is_done, not_contest) - VALUES ($1, $2, $3, $4, $5)` + events.fights(event_id, fighter_red_id, fighter_blue_id) + VALUES ($1, $2, $3)` args := []any{ - f.EventId, f.FighterRedId, f.FighterBlueId, f.IsDone, f.NotContest, + f.EventId, f.FighterRedId, f.FighterBlueId, } if tx != nil { @@ -32,16 +32,41 @@ func (r *Repository) TxCreateEventFight(ctx context.Context, tx pgx.Tx, f eventm return nil } -// SetFightResult updates the result of a fight in the 'fights' table. +// CreateFightResult creates result row in fight_results table. // It takes a context, a transaction, and a FightResultRequest. // It returns an error if the update fails. -func (r *Repository) SetFightResult(ctx context.Context, tx pgx.Tx, req *eventmodel.FightResultRequest) error { +func (r *Repository) CreateFightResult(ctx context.Context, tx pgx.Tx, req *eventmodel.FightResultRequest) error { + q := `INSERT INTO events.fight_results + (fight_id, winner_id, not_contest, is_draw) + VALUES ($1, $2, $3, $4);` + + args := []any{ + req.FightId, req.WinnerId, req.NotContest, req.IsDraw, + } + + if tx != nil { + if _, err := tx.Exec(ctx, q, args...); err != nil { + return r.DebugLogSqlErr(q, err) + } + } else { + if _, err := r.GetPool().Exec(ctx, q, args...); err != nil { + return r.DebugLogSqlErr(q, err) + } + } + + return nil +} + +// SetFightResult set is_done field as true of a fight in the 'fights' table. +// It takes a context, a transaction, and a fight id. +// It returns an error if the update fails. +func (r *Repository) SetFightIsDone(ctx context.Context, tx pgx.Tx, fightId int) error { q := `UPDATE events.fights - SET result = $1, not_contest = $2, is_done = true - WHERE fight_id = $3;` + SET is_done = true + WHERE fight_id = $1;` args := []any{ - req.WinnerId, req.NotContest, req.FightId, + fightId, } if tx != nil { diff --git a/events/migrations/init/init.go b/events/migrations/init/init.go index 62d3d1e..d540a7e 100644 --- a/events/migrations/init/init.go +++ b/events/migrations/init/init.go @@ -21,7 +21,7 @@ func InitEventsSchema(ctx context.Context, r *psql.Repository) error { queries := [][]string{ { // Queries to create Schema - `CREATE SCHEMA IF NOT EXISTS auth;`, + `CREATE SCHEMA IF NOT EXISTS events;`, }, { // Queries to create tables @@ -34,13 +34,18 @@ func InitEventsSchema(ctx context.Context, r *psql.Repository) error { );`, `CREATE TABLE IF NOT EXISTS events.events ( event_id integer NOT NULL, - name character varying(255) NOT NULL + name character varying(255) NOT NULL, + is_done boolean DEFAULT false );`, `CREATE TABLE IF NOT EXISTS events.fight_results ( result_id integer NOT NULL, fight_id integer, winner_id integer, - not_contest boolean DEFAULT false + not_contest boolean DEFAULT false, + is_draw boolean DEFAULT false, + round smallint, + method VARCHAR(50), + created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP );`, `CREATE TABLE IF NOT EXISTS events.fights ( fight_id integer NOT NULL, @@ -50,7 +55,6 @@ func InitEventsSchema(ctx context.Context, r *psql.Repository) error { created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, fight_date timestamp without time zone, is_canceled boolean DEFAULT false, - result integer DEFAULT '-1'::integer, event_id integer );`, }, diff --git a/events/pkg/model/events.go b/events/pkg/model/events.go index 153631c..cee0062 100644 --- a/events/pkg/model/events.go +++ b/events/pkg/model/events.go @@ -30,7 +30,11 @@ type FullEventResponse struct { // FightResultRequest represents a request for fight result with fight id, winner id and not contest flag. type FightResultRequest struct { - FightId int32 `json:"fight_id"` - WinnerId int32 `json:"winner_id"` - NotContest bool `json:"not_contest"` + FightId int32 `json:"fight_id"` + WinnerId int32 `json:"winner_id"` + IsCanceled bool `json:"is_canceled"` + IsDraw bool `json:"is_draw"` + NotContest bool `json:"not_contest"` + Method string `json:"method"` + Round int `json:"round"` } diff --git a/events/pkg/model/mapper.go b/events/pkg/model/mapper.go index 9731752..2f64c9a 100644 --- a/events/pkg/model/mapper.go +++ b/events/pkg/model/mapper.go @@ -29,7 +29,6 @@ func FightsFromProto(p []*gen.Fight) []Fight { FighterBlueId: v.FighterBlueId, IsDone: v.IsDone, IsCanceled: v.IsCanceled, - Result: v.Result, CreatedAt: v.CreatedAt, FightDate: int(v.FightDate), } @@ -141,6 +140,10 @@ func FightResultFromProto(p *gen.FightResultRequest) *FightResultRequest { FightId: p.FightId, WinnerId: p.WinnerId, NotContest: p.NotContest, + IsCanceled: p.IsCanceled, + IsDraw: p.IsDraw, + Round: int(p.Round), + Method: p.Method, } } @@ -149,6 +152,10 @@ func FightResultToProto(req *FightResultRequest) *gen.FightResultRequest { FightId: req.FightId, WinnerId: req.WinnerId, NotContest: req.NotContest, + IsCanceled: req.IsCanceled, + IsDraw: req.IsDraw, + Round: int32(req.Round), + Method: req.Method, } } diff --git a/fighters/cmd/cmd_test.go b/fighters/cmd/cmd_test.go index 3bb3734..03bba9f 100644 --- a/fighters/cmd/cmd_test.go +++ b/fighters/cmd/cmd_test.go @@ -204,8 +204,9 @@ func initTestConfig() { env := os.Getenv("APP_ENV") if env == "local" { - viper.SetConfigName("config") viper.AddConfigPath("../configs") + viper.SetConfigName("config.dev") + viper.SetConfigType("yaml") if err := viper.ReadInConfig(); err != nil { log.Fatalf("Error reading config file: %s\n", err) } diff --git a/fighters/cmd/root.go b/fighters/cmd/root.go index 090146a..720a97f 100644 --- a/fighters/cmd/root.go +++ b/fighters/cmd/root.go @@ -98,6 +98,7 @@ func setConfigDefaults() { viper.SetDefault("app.name", version.Name) viper.SetDefault("app.version", version.DevVersion) viper.SetDefault("app.run_date", time.Unix(version.RunDate, 0).Format(time.RFC1123)) + viper.SetDefault("app.fighters_path", "../data/fighters.json") // http server viper.SetDefault("http.addr", "127.0.0.1") diff --git a/fighters/cmd/utils.go b/fighters/cmd/utils.go index 30204ad..6f6e477 100644 --- a/fighters/cmd/utils.go +++ b/fighters/cmd/utils.go @@ -16,13 +16,13 @@ import ( "github.com/jackc/pgerrcode" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" + "github.com/spf13/viper" ) // ReadFighterData reads fighter data from a JSON file and returns a slice of model.Fighter. // The file path is set to "../../scraper/collection/fighters.json". func ReadFighterData() ([]model.Fighter, error) { - // TODO: tricky path - filePath := "./data/fighters.json" + filePath := viper.GetString("app.fighters_path") jsonData, err := os.ReadFile(filePath) if err != nil { diff --git a/fighters/internal/repository/psql/db_test.go b/fighters/internal/repository/psql/db_test.go index 8cf50a3..dfcf012 100644 --- a/fighters/internal/repository/psql/db_test.go +++ b/fighters/internal/repository/psql/db_test.go @@ -334,7 +334,7 @@ func initTestConfig() { env := os.Getenv("APP_ENV") if env == "local" { - viper.SetConfigName("config") + viper.SetConfigName("config.dev") viper.AddConfigPath("../../../configs") if err := viper.ReadInConfig(); err != nil { log.Fatalf("Error reading config file: %s\n", err) diff --git a/gen/pickfighter.pb.go b/gen/pickfighter.pb.go index e574424..fc2bd31 100644 --- a/gen/pickfighter.pb.go +++ b/gen/pickfighter.pb.go @@ -1262,9 +1262,13 @@ type FightResultRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FightId int32 `protobuf:"varint,1,opt,name=fightId,proto3" json:"fightId,omitempty"` - WinnerId int32 `protobuf:"varint,2,opt,name=winnerId,proto3" json:"winnerId,omitempty"` - NotContest bool `protobuf:"varint,3,opt,name=notContest,proto3" json:"notContest,omitempty"` + FightId int32 `protobuf:"varint,1,opt,name=fightId,proto3" json:"fightId,omitempty"` + WinnerId int32 `protobuf:"varint,2,opt,name=winnerId,proto3" json:"winnerId,omitempty"` + NotContest bool `protobuf:"varint,3,opt,name=notContest,proto3" json:"notContest,omitempty"` + IsCanceled bool `protobuf:"varint,4,opt,name=isCanceled,proto3" json:"isCanceled,omitempty"` + IsDraw bool `protobuf:"varint,5,opt,name=isDraw,proto3" json:"isDraw,omitempty"` + Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method,omitempty"` + Round int32 `protobuf:"varint,7,opt,name=round,proto3" json:"round,omitempty"` } func (x *FightResultRequest) Reset() { @@ -1320,6 +1324,34 @@ func (x *FightResultRequest) GetNotContest() bool { return false } +func (x *FightResultRequest) GetIsCanceled() bool { + if x != nil { + return x.IsCanceled + } + return false +} + +func (x *FightResultRequest) GetIsDraw() bool { + if x != nil { + return x.IsDraw + } + return false +} + +func (x *FightResultRequest) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *FightResultRequest) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + type FightResultResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2398,218 +2430,224 @@ var file_pickfighter_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x42, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x62, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x42, 0x65, 0x74, 0x52, 0x04, 0x62, 0x65, 0x74, 0x73, 0x22, 0x6a, - 0x0a, 0x12, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x13, 0x46, 0x69, - 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x05, - 0x46, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, + 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x42, 0x65, 0x74, 0x52, 0x04, 0x62, 0x65, 0x74, 0x73, 0x22, 0xd0, + 0x01, 0x0a, 0x12, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x72, 0x52, 0x65, 0x64, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0c, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x52, 0x65, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, - 0x0d, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x75, - 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, - 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x69, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, - 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x44, 0x61, 0x74, 0x65, 0x22, - 0x6d, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x68, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x06, - 0x66, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x22, 0x6b, - 0x0a, 0x03, 0x42, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x66, - 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, - 0x67, 0x68, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x07, - 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, - 0x74, 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, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x74, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x74, 0x6f, 0x77, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x73, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x73, 0x41, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, - 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x22, 0x0a, - 0x0c, 0x6f, 0x63, 0x74, 0x61, 0x67, 0x6f, 0x6e, 0x44, 0x65, 0x62, 0x75, 0x74, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x63, 0x74, 0x61, 0x67, 0x6f, 0x6e, 0x44, 0x65, 0x62, 0x75, - 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x62, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x64, 0x65, 0x62, 0x75, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, - 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x72, 0x65, 0x61, 0x63, 0x68, 0x12, - 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x67, 0x52, 0x65, 0x61, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x02, 0x52, 0x08, 0x6c, 0x65, 0x67, 0x52, 0x65, 0x61, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x77, - 0x69, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x77, 0x69, 0x6e, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x72, 0x61, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0xb4, 0x05, 0x0a, 0x0c, 0x46, - 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, - 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, - 0x32, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, 0x41, 0x74, - 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, - 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, - 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x41, 0x63, 0x63, - 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, - 0x64, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, 0x64, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x2c, 0x0a, + 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, + 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, + 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x69, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x44, 0x72, 0x61, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, + 0x72, 0x61, 0x77, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x22, 0x2f, 0x0a, 0x13, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, + 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, + 0x49, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x05, 0x46, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, + 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x52, 0x65, 0x64, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x42, + 0x6c, 0x75, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, + 0x44, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x44, 0x6f, + 0x6e, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x73, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, + 0x74, 0x44, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x66, 0x69, 0x67, + 0x68, 0x74, 0x44, 0x61, 0x74, 0x65, 0x22, 0x6d, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, + 0x06, 0x66, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, + 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x06, 0x66, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x69, 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, + 0x73, 0x44, 0x6f, 0x6e, 0x65, 0x22, 0x6b, 0x0a, 0x03, 0x42, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x66, 0x69, 0x67, 0x68, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, + 0x49, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x07, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x66, 0x69, 0x67, 0x68, 0x74, 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, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x64, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x74, 0x6f, 0x77, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x6d, 0x65, 0x74, 0x6f, 0x77, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x73, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x73, 0x41, 0x74, 0x12, 0x24, 0x0a, 0x0d, + 0x66, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x79, + 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x63, 0x74, 0x61, 0x67, 0x6f, 0x6e, 0x44, + 0x65, 0x62, 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x63, 0x74, 0x61, + 0x67, 0x6f, 0x6e, 0x44, 0x65, 0x62, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x62, 0x75, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x64, 0x65, 0x62, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x63, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x05, 0x72, 0x65, 0x61, 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x65, 0x67, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x6c, 0x65, 0x67, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x69, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x77, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x72, 0x61, 0x77, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x72, 0x61, 0x77, + 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x13, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x55, 0x72, 0x6c, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x46, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x22, 0xb4, 0x05, 0x0a, 0x0c, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x66, + 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, 0x72, + 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, + 0x69, 0x67, 0x53, 0x74, 0x72, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x67, 0x53, 0x74, + 0x72, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, + 0x72, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x73, 0x74, 0x72, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x0e, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, 0x64, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, 0x64, 0x4c, 0x61, + 0x6e, 0x64, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, 0x64, + 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6b, 0x64, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, - 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, - 0x6b, 0x64, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, - 0x6b, 0x64, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x74, 0x6b, 0x64, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x12, 0x22, 0x0a, - 0x0c, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x65, - 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x41, 0x62, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x41, 0x62, 0x73, 0x12, - 0x24, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x44, 0x65, - 0x66, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, - 0x6e, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, - 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, 0x67, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, - 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, - 0x76, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x76, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x63, 0x6b, - 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6b, - 0x6e, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x61, - 0x76, 0x67, 0x46, 0x69, 0x67, 0x68, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x61, 0x76, 0x67, 0x46, 0x69, 0x67, 0x68, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x4b, 0x4f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x4b, 0x4f, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6e, - 0x42, 0x79, 0x53, 0x75, 0x62, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x77, 0x69, 0x6e, - 0x42, 0x79, 0x53, 0x75, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x44, 0x65, - 0x63, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x44, 0x65, - 0x63, 0x22, 0x4b, 0x0a, 0x0f, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, - 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x0b, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x49, 0x64, 0x73, 0x22, 0x38, - 0x0a, 0x10, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x52, 0x08, - 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x22, 0x2d, 0x0a, 0x15, 0x46, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x70, - 0x70, 0x5f, 0x64, 0x65, 0x76, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x44, 0x65, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0c, 0x61, 0x70, 0x70, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x52, 0x75, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, - 0x24, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x76, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x61, 0x70, 0x70, 0x54, 0x69, 0x6d, 0x65, - 0x41, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xa8, 0x03, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x17, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x14, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, - 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0f, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x0f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xc8, 0x02, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x65, 0x74, 0x12, 0x11, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x42, 0x65, 0x74, 0x73, - 0x12, 0x0c, 0x2e, 0x42, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, - 0x2e, 0x42, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, - 0x09, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x13, 0x2e, 0x46, 0x69, 0x67, - 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x14, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc1, 0x01, - 0x0a, 0x0f, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x3f, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x69, 0x67, - 0x68, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x69, 0x67, 0x68, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x0f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x6b, 0x64, 0x41, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x6b, 0x64, 0x41, 0x63, 0x63, 0x75, + 0x72, 0x61, 0x63, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, 0x4c, 0x61, + 0x6e, 0x64, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x53, + 0x74, 0x72, 0x4c, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x53, + 0x74, 0x72, 0x41, 0x62, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x53, 0x74, 0x72, 0x41, 0x62, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x53, 0x74, 0x72, + 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, + 0x69, 0x67, 0x53, 0x74, 0x72, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, + 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x44, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x44, + 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x6f, + 0x77, 0x6e, 0x41, 0x76, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x61, 0x6b, + 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x75, 0x62, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x76, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x0d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x76, 0x67, 0x12, 0x22, + 0x0a, 0x0c, 0x6b, 0x6e, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x41, 0x76, 0x67, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x6b, 0x6e, 0x6f, 0x63, 0x6b, 0x64, 0x6f, 0x77, 0x6e, 0x41, + 0x76, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x76, 0x67, 0x46, 0x69, 0x67, 0x68, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x76, 0x67, 0x46, 0x69, 0x67, + 0x68, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x4b, + 0x4f, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x4b, 0x4f, + 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x53, 0x75, 0x62, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x42, 0x79, 0x53, 0x75, 0x62, 0x12, 0x1a, 0x0a, 0x08, + 0x77, 0x69, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x63, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x77, 0x69, 0x6e, 0x42, 0x79, 0x44, 0x65, 0x63, 0x22, 0x4b, 0x0a, 0x0f, 0x46, 0x69, 0x67, 0x68, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x49, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, + 0x72, 0x73, 0x49, 0x64, 0x73, 0x22, 0x38, 0x0a, 0x10, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x66, 0x69, 0x67, + 0x68, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x72, 0x52, 0x08, 0x66, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x22, + 0x2d, 0x0a, 0x15, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xed, + 0x01, 0x0a, 0x0e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x70, 0x70, 0x5f, 0x64, 0x65, 0x76, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x70, 0x70, 0x44, + 0x65, 0x76, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x61, 0x70, 0x70, 0x5f, 0x72, 0x75, 0x6e, 0x5f, + 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x52, + 0x75, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x70, 0x70, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x61, 0x70, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xa8, + 0x03, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, + 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x44, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x12, 0x17, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x14, + 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0f, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x18, + 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0f, + 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x10, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, 0x02, 0x0a, 0x0c, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x42, 0x65, 0x74, 0x73, 0x12, 0x0c, 0x2e, 0x42, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x42, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x13, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0b, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc1, 0x01, 0x0a, 0x0f, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x10, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x12, 0x10, 0x2e, 0x46, 0x69, + 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, + 0x46, 0x69, 0x67, 0x68, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2f, 0x67, 0x65, 0x6e, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/migrations/init/events_service_init.sql b/migrations/init/events_service_init.sql index 0b5976e..9daff9b 100644 --- a/migrations/init/events_service_init.sql +++ b/migrations/init/events_service_init.sql @@ -11,14 +11,19 @@ CREATE TABLE IF NOT EXISTS events.bets ( CREATE TABLE IF NOT EXISTS events.events ( event_id integer NOT NULL, - name character varying(255) NOT NULL + name character varying(255) NOT NULL, + is_done boolean DEFAULT false ); CREATE TABLE IF NOT EXISTS events.fight_results ( result_id integer NOT NULL, fight_id integer, winner_id integer, - not_contest boolean DEFAULT false + not_contest boolean DEFAULT false, + is_draw boolean DEFAULT false, + round smallint, + method VARCHAR(50), + created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, ); CREATE TABLE IF NOT EXISTS events.fights ( @@ -29,7 +34,6 @@ CREATE TABLE IF NOT EXISTS events.fights ( created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, fight_date timestamp without time zone, is_canceled boolean DEFAULT false, - result integer DEFAULT '-1'::integer, event_id integer );