diff --git a/backtester/btcli/commands.go b/backtester/btcli/commands.go index e4eef766..b908b466 100644 --- a/backtester/btcli/commands.go +++ b/backtester/btcli/commands.go @@ -3,9 +3,12 @@ package main import ( "fmt" "path/filepath" + "strconv" + "time" "github.com/thrasher-corp/gocryptotrader/backtester/btrpc" "github.com/thrasher-corp/gocryptotrader/backtester/config" + "github.com/thrasher-corp/gocryptotrader/common" "github.com/urfave/cli/v2" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -36,6 +39,21 @@ var executeStrategyFromFileCommand = &cli.Command{ }, doNotRunFlag, doNotStoreFlag, + &cli.StringFlag{ + Name: "starttimeoverride", + Aliases: []string{"s"}, + Usage: fmt.Sprintf("override the strategy file's start time using your local time. eg '%v'", time.Now().Truncate(time.Hour).AddDate(0, -1, 0).Format(common.SimpleTimeFormat)), + }, + &cli.StringFlag{ + Name: "endtimeoverride", + Aliases: []string{"e"}, + Usage: fmt.Sprintf("override the strategy file's end time using your local time. eg '%v'", time.Now().Truncate(time.Hour).Format(common.SimpleTimeFormat)), + }, + &cli.Uint64Flag{ + Name: "intervaloverride", + Aliases: []string{"i"}, + Usage: "override the strategy file's candle interval, in seconds. eg 60 = 1 minute", + }, }, } @@ -66,6 +84,51 @@ func executeStrategyFromFile(c *cli.Context) error { dns = c.Bool("donotstore") } + var startTimeOverride string + if c.IsSet("starttimeoverride") { + startTimeOverride = c.String("starttimeoverride") + } else { + startTimeOverride = c.Args().Get(3) + } + + var endTimeOverride string + if c.IsSet("endtimeoverride") { + endTimeOverride = c.String("endtimeoverride") + } else { + endTimeOverride = c.Args().Get(4) + } + + var s, e time.Time + if startTimeOverride != "" { + s, err = time.ParseInLocation(common.SimpleTimeFormat, startTimeOverride, time.Local) + if err != nil { + return fmt.Errorf("invalid time format for start: %v", err) + } + } + if endTimeOverride != "" { + e, err = time.ParseInLocation(common.SimpleTimeFormat, endTimeOverride, time.Local) + if err != nil { + return fmt.Errorf("invalid time format for end: %v", err) + } + } + if !s.IsZero() && !e.IsZero() { + err = common.StartEndTimeCheck(s, e) + if err != nil { + return err + } + } + + var intervalOverride uint64 + if c.IsSet("intervaloverride") { + intervalOverride = c.Uint64("intervaloverride") + } else if c.Args().Get(5) != "" { + intervalOverride, err = strconv.ParseUint(c.Args().Get(5), 10, 64) + if err != nil { + return err + } + } + overrideDuration := time.Duration(intervalOverride) * time.Second + client := btrpc.NewBacktesterServiceClient(conn) result, err := client.ExecuteStrategyFromFile( c.Context, @@ -73,6 +136,9 @@ func executeStrategyFromFile(c *cli.Context) error { StrategyFilePath: path, DoNotRunImmediately: dnr, DoNotStore: dns, + StartTimeOverride: timestamppb.New(s), + EndTimeOverride: timestamppb.New(e), + IntervalOverride: uint64(overrideDuration), }, ) @@ -448,11 +514,11 @@ func executeStrategyFromConfig(c *cli.Context) error { } } if defaultConfig.DataSettings.LiveData != nil { - creds := make([]*btrpc.ExchangeCredentials, len(defaultConfig.DataSettings.LiveData.ExchangeCredentials)) + creds := make([]*btrpc.Credentials, len(defaultConfig.DataSettings.LiveData.ExchangeCredentials)) for i := range defaultConfig.DataSettings.LiveData.ExchangeCredentials { - creds[i] = &btrpc.ExchangeCredentials{ + creds[i] = &btrpc.Credentials{ Exchange: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Exchange, - Keys: &btrpc.ExchangeKeys{ + Keys: &btrpc.ExchangeCredentials{ Key: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.Key, Secret: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.Secret, ClientId: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.ClientID, diff --git a/backtester/btrpc/btrpc.pb.go b/backtester/btrpc/btrpc.pb.go index 9c16a38d..c278ddc8 100644 --- a/backtester/btrpc/btrpc.pb.go +++ b/backtester/btrpc/btrpc.pb.go @@ -1199,166 +1199,25 @@ func (x *CSVData) GetPath() string { return "" } -type ExchangeKeys struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` - ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - PemKey string `protobuf:"bytes,4,opt,name=pem_key,json=pemKey,proto3" json:"pem_key,omitempty"` - SubAccount string `protobuf:"bytes,5,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` - OneTimePassword string `protobuf:"bytes,6,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` -} - -func (x *ExchangeKeys) Reset() { - *x = ExchangeKeys{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExchangeKeys) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExchangeKeys) ProtoMessage() {} - -func (x *ExchangeKeys) ProtoReflect() protoreflect.Message { - mi := &file_btrpc_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExchangeKeys.ProtoReflect.Descriptor instead. -func (*ExchangeKeys) Descriptor() ([]byte, []int) { - return file_btrpc_proto_rawDescGZIP(), []int{16} -} - -func (x *ExchangeKeys) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *ExchangeKeys) GetSecret() string { - if x != nil { - return x.Secret - } - return "" -} - -func (x *ExchangeKeys) GetClientId() string { - if x != nil { - return x.ClientId - } - return "" -} - -func (x *ExchangeKeys) GetPemKey() string { - if x != nil { - return x.PemKey - } - return "" -} - -func (x *ExchangeKeys) GetSubAccount() string { - if x != nil { - return x.SubAccount - } - return "" -} - -func (x *ExchangeKeys) GetOneTimePassword() string { - if x != nil { - return x.OneTimePassword - } - return "" -} - -type ExchangeCredentials struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` - Keys *ExchangeKeys `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` -} - -func (x *ExchangeCredentials) Reset() { - *x = ExchangeCredentials{} - if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExchangeCredentials) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExchangeCredentials) ProtoMessage() {} - -func (x *ExchangeCredentials) ProtoReflect() protoreflect.Message { - mi := &file_btrpc_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExchangeCredentials.ProtoReflect.Descriptor instead. -func (*ExchangeCredentials) Descriptor() ([]byte, []int) { - return file_btrpc_proto_rawDescGZIP(), []int{17} -} - -func (x *ExchangeCredentials) GetExchange() string { - if x != nil { - return x.Exchange - } - return "" -} - -func (x *ExchangeCredentials) GetKeys() *ExchangeKeys { - if x != nil { - return x.Keys - } - return nil -} - type LiveData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NewEventTimeout int64 `protobuf:"varint,1,opt,name=new_event_timeout,json=newEventTimeout,proto3" json:"new_event_timeout,omitempty"` - DataCheckTimer int64 `protobuf:"varint,2,opt,name=data_check_timer,json=dataCheckTimer,proto3" json:"data_check_timer,omitempty"` - RealOrders bool `protobuf:"varint,3,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` - ClosePositionsOnStop bool `protobuf:"varint,4,opt,name=close_positions_on_stop,json=closePositionsOnStop,proto3" json:"close_positions_on_stop,omitempty"` - DataRequestRetryTolerance int64 `protobuf:"varint,5,opt,name=data_request_retry_tolerance,json=dataRequestRetryTolerance,proto3" json:"data_request_retry_tolerance,omitempty"` - DataRequestRetryWaitTime int64 `protobuf:"varint,6,opt,name=data_request_retry_wait_time,json=dataRequestRetryWaitTime,proto3" json:"data_request_retry_wait_time,omitempty"` - Credentials []*ExchangeCredentials `protobuf:"bytes,7,rep,name=credentials,proto3" json:"credentials,omitempty"` + NewEventTimeout int64 `protobuf:"varint,1,opt,name=new_event_timeout,json=newEventTimeout,proto3" json:"new_event_timeout,omitempty"` + DataCheckTimer int64 `protobuf:"varint,2,opt,name=data_check_timer,json=dataCheckTimer,proto3" json:"data_check_timer,omitempty"` + RealOrders bool `protobuf:"varint,3,opt,name=real_orders,json=realOrders,proto3" json:"real_orders,omitempty"` + ClosePositionsOnStop bool `protobuf:"varint,4,opt,name=close_positions_on_stop,json=closePositionsOnStop,proto3" json:"close_positions_on_stop,omitempty"` + DataRequestRetryTolerance int64 `protobuf:"varint,5,opt,name=data_request_retry_tolerance,json=dataRequestRetryTolerance,proto3" json:"data_request_retry_tolerance,omitempty"` + DataRequestRetryWaitTime int64 `protobuf:"varint,6,opt,name=data_request_retry_wait_time,json=dataRequestRetryWaitTime,proto3" json:"data_request_retry_wait_time,omitempty"` + UseRealOrders bool `protobuf:"varint,7,opt,name=use_real_orders,json=useRealOrders,proto3" json:"use_real_orders,omitempty"` + Credentials []*Credentials `protobuf:"bytes,8,rep,name=credentials,proto3" json:"credentials,omitempty"` } func (x *LiveData) Reset() { *x = LiveData{} if protoimpl.UnsafeEnabled { - mi := &file_btrpc_proto_msgTypes[18] + mi := &file_btrpc_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1371,7 +1230,7 @@ func (x *LiveData) String() string { func (*LiveData) ProtoMessage() {} func (x *LiveData) ProtoReflect() protoreflect.Message { - mi := &file_btrpc_proto_msgTypes[18] + mi := &file_btrpc_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1384,7 +1243,7 @@ func (x *LiveData) ProtoReflect() protoreflect.Message { // Deprecated: Use LiveData.ProtoReflect.Descriptor instead. func (*LiveData) Descriptor() ([]byte, []int) { - return file_btrpc_proto_rawDescGZIP(), []int{18} + return file_btrpc_proto_rawDescGZIP(), []int{16} } func (x *LiveData) GetNewEventTimeout() int64 { @@ -1429,13 +1288,162 @@ func (x *LiveData) GetDataRequestRetryWaitTime() int64 { return 0 } -func (x *LiveData) GetCredentials() []*ExchangeCredentials { +func (x *LiveData) GetUseRealOrders() bool { + if x != nil { + return x.UseRealOrders + } + return false +} + +func (x *LiveData) GetCredentials() []*Credentials { if x != nil { return x.Credentials } return nil } +type Credentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exchange string `protobuf:"bytes,1,opt,name=exchange,proto3" json:"exchange,omitempty"` + Keys *ExchangeCredentials `protobuf:"bytes,2,opt,name=keys,proto3" json:"keys,omitempty"` +} + +func (x *Credentials) Reset() { + *x = Credentials{} + if protoimpl.UnsafeEnabled { + mi := &file_btrpc_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Credentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Credentials) ProtoMessage() {} + +func (x *Credentials) ProtoReflect() protoreflect.Message { + mi := &file_btrpc_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Credentials.ProtoReflect.Descriptor instead. +func (*Credentials) Descriptor() ([]byte, []int) { + return file_btrpc_proto_rawDescGZIP(), []int{17} +} + +func (x *Credentials) GetExchange() string { + if x != nil { + return x.Exchange + } + return "" +} + +func (x *Credentials) GetKeys() *ExchangeCredentials { + if x != nil { + return x.Keys + } + return nil +} + +type ExchangeCredentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + ClientId string `protobuf:"bytes,3,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + PemKey string `protobuf:"bytes,4,opt,name=pem_key,json=pemKey,proto3" json:"pem_key,omitempty"` + SubAccount string `protobuf:"bytes,5,opt,name=sub_account,json=subAccount,proto3" json:"sub_account,omitempty"` + OneTimePassword string `protobuf:"bytes,6,opt,name=one_time_password,json=oneTimePassword,proto3" json:"one_time_password,omitempty"` +} + +func (x *ExchangeCredentials) Reset() { + *x = ExchangeCredentials{} + if protoimpl.UnsafeEnabled { + mi := &file_btrpc_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExchangeCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExchangeCredentials) ProtoMessage() {} + +func (x *ExchangeCredentials) ProtoReflect() protoreflect.Message { + mi := &file_btrpc_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExchangeCredentials.ProtoReflect.Descriptor instead. +func (*ExchangeCredentials) Descriptor() ([]byte, []int) { + return file_btrpc_proto_rawDescGZIP(), []int{18} +} + +func (x *ExchangeCredentials) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *ExchangeCredentials) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *ExchangeCredentials) GetClientId() string { + if x != nil { + return x.ClientId + } + return "" +} + +func (x *ExchangeCredentials) GetPemKey() string { + if x != nil { + return x.PemKey + } + return "" +} + +func (x *ExchangeCredentials) GetSubAccount() string { + if x != nil { + return x.SubAccount + } + return "" +} + +func (x *ExchangeCredentials) GetOneTimePassword() string { + if x != nil { + return x.OneTimePassword + } + return "" +} + type DataSettings struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1916,9 +1924,12 @@ type ExecuteStrategyFromFileRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - StrategyFilePath string `protobuf:"bytes,1,opt,name=strategy_file_path,json=strategyFilePath,proto3" json:"strategy_file_path,omitempty"` - DoNotRunImmediately bool `protobuf:"varint,2,opt,name=do_not_run_immediately,json=doNotRunImmediately,proto3" json:"do_not_run_immediately,omitempty"` - DoNotStore bool `protobuf:"varint,3,opt,name=do_not_store,json=doNotStore,proto3" json:"do_not_store,omitempty"` + StrategyFilePath string `protobuf:"bytes,1,opt,name=strategy_file_path,json=strategyFilePath,proto3" json:"strategy_file_path,omitempty"` + DoNotRunImmediately bool `protobuf:"varint,2,opt,name=do_not_run_immediately,json=doNotRunImmediately,proto3" json:"do_not_run_immediately,omitempty"` + DoNotStore bool `protobuf:"varint,3,opt,name=do_not_store,json=doNotStore,proto3" json:"do_not_store,omitempty"` + StartTimeOverride *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time_override,json=startTimeOverride,proto3" json:"start_time_override,omitempty"` + EndTimeOverride *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time_override,json=endTimeOverride,proto3" json:"end_time_override,omitempty"` + IntervalOverride uint64 `protobuf:"varint,6,opt,name=interval_override,json=intervalOverride,proto3" json:"interval_override,omitempty"` } func (x *ExecuteStrategyFromFileRequest) Reset() { @@ -1974,6 +1985,27 @@ func (x *ExecuteStrategyFromFileRequest) GetDoNotStore() bool { return false } +func (x *ExecuteStrategyFromFileRequest) GetStartTimeOverride() *timestamppb.Timestamp { + if x != nil { + return x.StartTimeOverride + } + return nil +} + +func (x *ExecuteStrategyFromFileRequest) GetEndTimeOverride() *timestamppb.Timestamp { + if x != nil { + return x.EndTimeOverride + } + return nil +} + +func (x *ExecuteStrategyFromFileRequest) GetIntervalOverride() uint64 { + if x != nil { + return x.IntervalOverride + } + return 0 +} + type ExecuteStrategyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2910,276 +2942,290 @@ var file_btrpc_proto_rawDesc = []byte{ 0x52, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x45, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x22, 0x1d, 0x0a, 0x07, 0x43, 0x53, 0x56, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x22, 0xbb, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4b, 0x65, - 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x6d, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x6d, 0x4b, - 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x6f, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, - 0x5a, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xf7, 0x02, 0x0a, 0x08, - 0x4c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x6e, 0x65, 0x77, 0x5f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6e, 0x65, 0x77, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, - 0x64, 0x61, 0x74, 0x61, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x1f, - 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x35, 0x0a, 0x17, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x14, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x4f, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x3f, 0x0a, 0x1c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x74, 0x6f, 0x6c, - 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x79, 0x54, 0x6f, - 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3e, 0x0a, 0x1c, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x77, 0x61, - 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x64, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x74, 0x72, 0x79, 0x57, - 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, - 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, - 0x52, 0x07, 0x61, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x0d, 0x64, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, - 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x08, 0x63, 0x73, 0x76, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x53, - 0x56, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x73, 0x76, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, - 0x0a, 0x09, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x76, 0x65, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x22, 0xfd, 0x01, 0x0a, - 0x08, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x61, 0x6e, - 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x1e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, - 0x74, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, - 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, - 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6d, - 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, - 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xa2, 0x01, 0x0a, - 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x76, - 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, - 0x2e, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, - 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x07, 0x62, 0x75, 0x79, 0x53, 0x69, 0x64, 0x65, 0x12, - 0x30, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, - 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x64, - 0x65, 0x22, 0x39, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, - 0x72, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x69, 0x73, 0x6b, 0x46, 0x72, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xd3, 0x03, 0x0a, - 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x12, 0x44, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, - 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x44, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x73, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x47, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x5f, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, - 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x11, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, - 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, - 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, - 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6c, 0x69, 0x76, 0x65, 0x54, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, - 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, - 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, - 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, - 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, - 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x41, - 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x61, 0x73, - 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, - 0x6b, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, - 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, - 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, - 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x68, 0x22, 0x97, 0x03, 0x0a, 0x08, 0x4c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, + 0x0a, 0x11, 0x6e, 0x65, 0x77, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6e, 0x65, 0x77, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x6f, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4f, 0x6e, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x3f, 0x0a, 0x1c, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x74, + 0x72, 0x79, 0x5f, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x19, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x74, 0x72, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3e, 0x0a, + 0x1c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, + 0x74, 0x72, 0x79, 0x5f, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x18, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x74, 0x72, 0x79, 0x57, 0x61, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, + 0x0f, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x73, 0x65, 0x52, 0x65, 0x61, 0x6c, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x0b, + 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x22, 0x59, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x6d, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x6d, 0x4b, 0x65, 0x79, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x2a, 0x0a, 0x11, 0x6f, 0x6e, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x6e, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x84, 0x02, 0x0a, 0x0c, + 0x44, 0x61, 0x74, 0x61, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, + 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x61, 0x70, 0x69, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x38, 0x0a, 0x0d, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x08, 0x63, 0x73, 0x76, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x53, 0x56, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x73, 0x76, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, 0x09, 0x6c, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x76, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6c, 0x69, 0x76, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x22, 0xfd, 0x01, 0x0a, 0x08, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, + 0x28, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x55, 0x73, + 0x65, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x4a, 0x0a, 0x22, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, + 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x32, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x4c, 0x65, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x20, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, + 0x6c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x43, 0x6f, 0x6c, 0x6c, + 0x61, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x65, 0x76, 0x65, + 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x65, 0x76, + 0x65, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x5f, 0x73, 0x69, 0x64, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x07, 0x62, 0x75, + 0x79, 0x53, 0x69, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x6c, 0x5f, 0x73, 0x69, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x53, 0x69, 0x64, 0x65, 0x52, 0x08, 0x73, + 0x65, 0x6c, 0x6c, 0x53, 0x69, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x24, 0x0a, 0x0e, + 0x72, 0x69, 0x73, 0x6b, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x69, 0x73, 0x6b, 0x46, 0x72, 0x65, 0x65, 0x52, 0x61, + 0x74, 0x65, 0x22, 0xd3, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, + 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x67, 0x6f, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x67, 0x6f, 0x61, 0x6c, 0x12, 0x44, 0x0a, + 0x11, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x10, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0f, 0x66, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x44, 0x0a, 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x38, 0x0a, 0x0d, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x47, 0x0a, 0x12, 0x70, 0x6f, 0x72, 0x74, 0x66, 0x6f, + 0x6c, 0x69, 0x6f, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x66, + 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x70, 0x6f, + 0x72, 0x74, 0x66, 0x6f, 0x6c, 0x69, 0x6f, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x47, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x65, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x06, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x69, 0x76, 0x65, + 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x6c, 0x69, 0x76, 0x65, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x72, + 0x65, 0x61, 0x6c, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x72, 0x65, 0x61, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x22, 0xe6, 0x02, 0x0a, + 0x1e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, + 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, + 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x12, 0x46, 0x0a, 0x11, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x41, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x26, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, + 0x16, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6d, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, + 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x75, 0x6e, 0x49, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, + 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x70, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x73, + 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x54, 0x61, + 0x73, 0x6b, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x2d, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, + 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, + 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x6f, 0x70, + 0x70, 0x65, 0x64, 0x22, 0x22, 0x0a, 0x10, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4a, 0x0a, 0x11, 0x43, 0x6c, 0x65, 0x61, 0x72, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x21, 0x0a, - 0x0f, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x49, 0x0a, 0x10, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, - 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, - 0x73, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x22, 0x0a, 0x10, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x2d, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x22, 0x16, - 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, - 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x5f, 0x73, 0x74, 0x6f, - 0x70, 0x70, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x22, 0x22, 0x0a, 0x10, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x4a, 0x0a, 0x11, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, - 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x0b, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x16, 0x0a, 0x14, - 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, - 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, - 0x0a, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, - 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x61, 0x69, - 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x32, 0xb9, 0x07, 0x0a, 0x11, 0x42, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, - 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, - 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x27, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1f, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x61, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x12, 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x60, 0x0a, 0x0d, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x0c, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x51, 0x0a, 0x08, - 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0e, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x74, 0x61, 0x73, 0x6b, 0x12, - 0x61, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, - 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, - 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, - 0x6b, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, 0x31, 0x2f, - 0x63, 0x6c, 0x65, 0x61, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x43, 0x6c, 0x65, - 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, + 0x61, 0x73, 0x6b, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, - 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, - 0x68, 0x72, 0x61, 0x73, 0x68, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x67, 0x6f, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, - 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x62, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, + 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x3b, + 0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x73, 0x6b, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x32, 0xbe, 0x07, 0x0a, 0x11, + 0x42, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x85, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x25, 0x2e, + 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x1b, 0x2f, 0x76, + 0x31, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x66, 0x72, 0x6f, 0x6d, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x19, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, 0x72, 0x6f, + 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x27, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x46, + 0x72, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x66, 0x72, 0x6f, + 0x6d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x55, 0x0a, 0x09, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x74, 0x61, 0x73, + 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x6c, 0x6c, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x51, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x62, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x22, 0x0c, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x61, 0x0a, 0x0c, 0x53, + 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x6f, 0x70, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x70, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x55, + 0x0a, 0x09, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x17, 0x2e, 0x62, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, + 0x61, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x2a, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x65, 0x61, + 0x72, 0x74, 0x61, 0x73, 0x6b, 0x12, 0x65, 0x0a, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x65, 0x61, + 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x63, + 0x6c, 0x65, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x3a, 0x5a, 0x38, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x72, 0x61, 0x73, + 0x68, 0x65, 0x72, 0x2d, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x67, 0x6f, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x74, 0x65, 0x73, 0x74, + 0x65, 0x72, 0x2f, 0x62, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3212,9 +3258,9 @@ var file_btrpc_proto_goTypes = []interface{}{ (*DatabaseConfig)(nil), // 13: btrpc.DatabaseConfig (*DatabaseData)(nil), // 14: btrpc.DatabaseData (*CSVData)(nil), // 15: btrpc.CSVData - (*ExchangeKeys)(nil), // 16: btrpc.ExchangeKeys - (*ExchangeCredentials)(nil), // 17: btrpc.ExchangeCredentials - (*LiveData)(nil), // 18: btrpc.LiveData + (*LiveData)(nil), // 16: btrpc.LiveData + (*Credentials)(nil), // 17: btrpc.Credentials + (*ExchangeCredentials)(nil), // 18: btrpc.ExchangeCredentials (*DataSettings)(nil), // 19: btrpc.DataSettings (*Leverage)(nil), // 20: btrpc.Leverage (*PortfolioSettings)(nil), // 21: btrpc.PortfolioSettings @@ -3257,12 +3303,12 @@ var file_btrpc_proto_depIdxs = []int32{ 42, // 13: btrpc.DatabaseData.start_date:type_name -> google.protobuf.Timestamp 42, // 14: btrpc.DatabaseData.end_date:type_name -> google.protobuf.Timestamp 13, // 15: btrpc.DatabaseData.config:type_name -> btrpc.DatabaseConfig - 16, // 16: btrpc.ExchangeCredentials.keys:type_name -> btrpc.ExchangeKeys - 17, // 17: btrpc.LiveData.credentials:type_name -> btrpc.ExchangeCredentials + 17, // 16: btrpc.LiveData.credentials:type_name -> btrpc.Credentials + 18, // 17: btrpc.Credentials.keys:type_name -> btrpc.ExchangeCredentials 8, // 18: btrpc.DataSettings.api_data:type_name -> btrpc.ApiData 14, // 19: btrpc.DataSettings.database_data:type_name -> btrpc.DatabaseData 15, // 20: btrpc.DataSettings.csv_data:type_name -> btrpc.CSVData - 18, // 21: btrpc.DataSettings.live_data:type_name -> btrpc.LiveData + 16, // 21: btrpc.DataSettings.live_data:type_name -> btrpc.LiveData 20, // 22: btrpc.PortfolioSettings.leverage:type_name -> btrpc.Leverage 4, // 23: btrpc.PortfolioSettings.buy_side:type_name -> btrpc.PurchaseSide 4, // 24: btrpc.PortfolioSettings.sell_side:type_name -> btrpc.PurchaseSide @@ -3272,37 +3318,39 @@ var file_btrpc_proto_depIdxs = []int32{ 19, // 28: btrpc.Config.data_settings:type_name -> btrpc.DataSettings 21, // 29: btrpc.Config.portfolio_settings:type_name -> btrpc.PortfolioSettings 22, // 30: btrpc.Config.statistic_settings:type_name -> btrpc.StatisticSettings - 24, // 31: btrpc.ExecuteStrategyResponse.task:type_name -> btrpc.TaskSummary - 23, // 32: btrpc.ExecuteStrategyFromConfigRequest.config:type_name -> btrpc.Config - 24, // 33: btrpc.ListAllTasksResponse.tasks:type_name -> btrpc.TaskSummary - 24, // 34: btrpc.StopTaskResponse.stopped_task:type_name -> btrpc.TaskSummary - 24, // 35: btrpc.StopAllTasksResponse.tasks_stopped:type_name -> btrpc.TaskSummary - 24, // 36: btrpc.ClearTaskResponse.cleared_task:type_name -> btrpc.TaskSummary - 24, // 37: btrpc.ClearAllTasksResponse.cleared_tasks:type_name -> btrpc.TaskSummary - 24, // 38: btrpc.ClearAllTasksResponse.remaining_tasks:type_name -> btrpc.TaskSummary - 25, // 39: btrpc.BacktesterService.ExecuteStrategyFromFile:input_type -> btrpc.ExecuteStrategyFromFileRequest - 27, // 40: btrpc.BacktesterService.ExecuteStrategyFromConfig:input_type -> btrpc.ExecuteStrategyFromConfigRequest - 28, // 41: btrpc.BacktesterService.ListAllTasks:input_type -> btrpc.ListAllTasksRequest - 32, // 42: btrpc.BacktesterService.StartTask:input_type -> btrpc.StartTaskRequest - 34, // 43: btrpc.BacktesterService.StartAllTasks:input_type -> btrpc.StartAllTasksRequest - 30, // 44: btrpc.BacktesterService.StopTask:input_type -> btrpc.StopTaskRequest - 36, // 45: btrpc.BacktesterService.StopAllTasks:input_type -> btrpc.StopAllTasksRequest - 38, // 46: btrpc.BacktesterService.ClearTask:input_type -> btrpc.ClearTaskRequest - 40, // 47: btrpc.BacktesterService.ClearAllTasks:input_type -> btrpc.ClearAllTasksRequest - 26, // 48: btrpc.BacktesterService.ExecuteStrategyFromFile:output_type -> btrpc.ExecuteStrategyResponse - 26, // 49: btrpc.BacktesterService.ExecuteStrategyFromConfig:output_type -> btrpc.ExecuteStrategyResponse - 29, // 50: btrpc.BacktesterService.ListAllTasks:output_type -> btrpc.ListAllTasksResponse - 33, // 51: btrpc.BacktesterService.StartTask:output_type -> btrpc.StartTaskResponse - 35, // 52: btrpc.BacktesterService.StartAllTasks:output_type -> btrpc.StartAllTasksResponse - 31, // 53: btrpc.BacktesterService.StopTask:output_type -> btrpc.StopTaskResponse - 37, // 54: btrpc.BacktesterService.StopAllTasks:output_type -> btrpc.StopAllTasksResponse - 39, // 55: btrpc.BacktesterService.ClearTask:output_type -> btrpc.ClearTaskResponse - 41, // 56: btrpc.BacktesterService.ClearAllTasks:output_type -> btrpc.ClearAllTasksResponse - 48, // [48:57] is the sub-list for method output_type - 39, // [39:48] is the sub-list for method input_type - 39, // [39:39] is the sub-list for extension type_name - 39, // [39:39] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name + 42, // 31: btrpc.ExecuteStrategyFromFileRequest.start_time_override:type_name -> google.protobuf.Timestamp + 42, // 32: btrpc.ExecuteStrategyFromFileRequest.end_time_override:type_name -> google.protobuf.Timestamp + 24, // 33: btrpc.ExecuteStrategyResponse.task:type_name -> btrpc.TaskSummary + 23, // 34: btrpc.ExecuteStrategyFromConfigRequest.config:type_name -> btrpc.Config + 24, // 35: btrpc.ListAllTasksResponse.tasks:type_name -> btrpc.TaskSummary + 24, // 36: btrpc.StopTaskResponse.stopped_task:type_name -> btrpc.TaskSummary + 24, // 37: btrpc.StopAllTasksResponse.tasks_stopped:type_name -> btrpc.TaskSummary + 24, // 38: btrpc.ClearTaskResponse.cleared_task:type_name -> btrpc.TaskSummary + 24, // 39: btrpc.ClearAllTasksResponse.cleared_tasks:type_name -> btrpc.TaskSummary + 24, // 40: btrpc.ClearAllTasksResponse.remaining_tasks:type_name -> btrpc.TaskSummary + 25, // 41: btrpc.BacktesterService.ExecuteStrategyFromFile:input_type -> btrpc.ExecuteStrategyFromFileRequest + 27, // 42: btrpc.BacktesterService.ExecuteStrategyFromConfig:input_type -> btrpc.ExecuteStrategyFromConfigRequest + 28, // 43: btrpc.BacktesterService.ListAllTasks:input_type -> btrpc.ListAllTasksRequest + 32, // 44: btrpc.BacktesterService.StartTask:input_type -> btrpc.StartTaskRequest + 34, // 45: btrpc.BacktesterService.StartAllTasks:input_type -> btrpc.StartAllTasksRequest + 30, // 46: btrpc.BacktesterService.StopTask:input_type -> btrpc.StopTaskRequest + 36, // 47: btrpc.BacktesterService.StopAllTasks:input_type -> btrpc.StopAllTasksRequest + 38, // 48: btrpc.BacktesterService.ClearTask:input_type -> btrpc.ClearTaskRequest + 40, // 49: btrpc.BacktesterService.ClearAllTasks:input_type -> btrpc.ClearAllTasksRequest + 26, // 50: btrpc.BacktesterService.ExecuteStrategyFromFile:output_type -> btrpc.ExecuteStrategyResponse + 26, // 51: btrpc.BacktesterService.ExecuteStrategyFromConfig:output_type -> btrpc.ExecuteStrategyResponse + 29, // 52: btrpc.BacktesterService.ListAllTasks:output_type -> btrpc.ListAllTasksResponse + 33, // 53: btrpc.BacktesterService.StartTask:output_type -> btrpc.StartTaskResponse + 35, // 54: btrpc.BacktesterService.StartAllTasks:output_type -> btrpc.StartAllTasksResponse + 31, // 55: btrpc.BacktesterService.StopTask:output_type -> btrpc.StopTaskResponse + 37, // 56: btrpc.BacktesterService.StopAllTasks:output_type -> btrpc.StopAllTasksResponse + 39, // 57: btrpc.BacktesterService.ClearTask:output_type -> btrpc.ClearTaskResponse + 41, // 58: btrpc.BacktesterService.ClearAllTasks:output_type -> btrpc.ClearAllTasksResponse + 50, // [50:59] is the sub-list for method output_type + 41, // [41:50] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name } func init() { file_btrpc_proto_init() } @@ -3504,7 +3552,7 @@ func file_btrpc_proto_init() { } } file_btrpc_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExchangeKeys); i { + switch v := v.(*LiveData); i { case 0: return &v.state case 1: @@ -3516,7 +3564,7 @@ func file_btrpc_proto_init() { } } file_btrpc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExchangeCredentials); i { + switch v := v.(*Credentials); i { case 0: return &v.state case 1: @@ -3528,7 +3576,7 @@ func file_btrpc_proto_init() { } } file_btrpc_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LiveData); i { + switch v := v.(*ExchangeCredentials); i { case 0: return &v.state case 1: diff --git a/backtester/btrpc/btrpc.pb.gw.go b/backtester/btrpc/btrpc.pb.gw.go index e649400e..07f6ecf1 100644 --- a/backtester/btrpc/btrpc.pb.gw.go +++ b/backtester/btrpc/btrpc.pb.gw.go @@ -397,7 +397,7 @@ func RegisterBacktesterServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/btrpc.BacktesterService/StartAllTasks", runtime.WithHTTPPathPattern("/v1/startall")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/btrpc.BacktesterService/StartAllTasks", runtime.WithHTTPPathPattern("/v1/startalltasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -649,7 +649,7 @@ func RegisterBacktesterServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/btrpc.BacktesterService/StartAllTasks", runtime.WithHTTPPathPattern("/v1/startall")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/btrpc.BacktesterService/StartAllTasks", runtime.WithHTTPPathPattern("/v1/startalltasks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -765,7 +765,7 @@ var ( pattern_BacktesterService_StartTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "starttask"}, "")) - pattern_BacktesterService_StartAllTasks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "startall"}, "")) + pattern_BacktesterService_StartAllTasks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "startalltasks"}, "")) pattern_BacktesterService_StopTask_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "stoptask"}, "")) diff --git a/backtester/btrpc/btrpc.proto b/backtester/btrpc/btrpc.proto index 467ec4b9..94fc3e9b 100644 --- a/backtester/btrpc/btrpc.proto +++ b/backtester/btrpc/btrpc.proto @@ -126,12 +126,28 @@ message CSVData { } message LiveData { - string api_key_override = 1; - string api_secret_override = 2; - string api_client_id_override = 3; - string api_2fa_override = 4; - string api_sub_account_override = 5; - bool use_real_orders = 6; + int64 new_event_timeout = 1; + int64 data_check_timer = 2; + bool real_orders = 3; + bool close_positions_on_stop = 4; + int64 data_request_retry_tolerance = 5; + int64 data_request_retry_wait_time = 6; + bool use_real_orders = 7; + repeated Credentials credentials = 8; +} + +message Credentials { + string exchange = 1; + ExchangeCredentials keys = 2; +} + +message ExchangeCredentials { + string key = 1; + string secret = 2; + string client_id = 3; + string pem_key = 4; + string sub_account = 5; + string one_time_password = 6; } message DataSettings { @@ -171,7 +187,7 @@ message Config { StatisticSettings statistic_settings = 8; } -message RunSummary { +message TaskSummary { string id = 1; string strategy_name = 2; string date_loaded = 3; @@ -187,10 +203,13 @@ message ExecuteStrategyFromFileRequest { string strategy_file_path = 1; bool do_not_run_immediately = 2; bool do_not_store = 3; + google.protobuf.Timestamp start_time_override = 4; + google.protobuf.Timestamp end_time_override = 5; + uint64 interval_override = 6; } message ExecuteStrategyResponse { - RunSummary run = 1; + TaskSummary task = 1; } message ExecuteStrategyFromConfigRequest { @@ -199,53 +218,53 @@ message ExecuteStrategyFromConfigRequest { btrpc.Config config = 3; } -message ListAllRunsRequest {} +message ListAllTasksRequest {} -message ListAllRunsResponse { - repeated RunSummary runs = 1; +message ListAllTasksResponse { + repeated TaskSummary tasks = 1; } -message StopRunRequest { +message StopTaskRequest { string id = 1; } -message StopRunResponse { - RunSummary stopped_run = 1; +message StopTaskResponse { + TaskSummary stopped_task = 1; } -message StartRunRequest { +message StartTaskRequest { string id = 1; } -message StartRunResponse { +message StartTaskResponse { bool started = 1; } -message StartAllRunsRequest {} +message StartAllTasksRequest {} -message StartAllRunsResponse { - repeated string runs_started = 1; +message StartAllTasksResponse { + repeated string tasks_started = 1; } -message StopAllRunsRequest {} +message StopAllTasksRequest {} -message StopAllRunsResponse { - repeated RunSummary runs_stopped = 1; +message StopAllTasksResponse { + repeated TaskSummary tasks_stopped = 1; } -message ClearRunRequest { +message ClearTaskRequest { string id = 1; } -message ClearRunResponse { - RunSummary cleared_run = 1; +message ClearTaskResponse { + TaskSummary cleared_task = 1; } -message ClearAllRunsRequest {} +message ClearAllTasksRequest {} -message ClearAllRunsResponse { - repeated RunSummary cleared_runs = 1; - repeated RunSummary remaining_runs = 2; +message ClearAllTasksResponse { + repeated TaskSummary cleared_tasks = 1; + repeated TaskSummary remaining_tasks = 2; } service BacktesterService { @@ -255,25 +274,25 @@ service BacktesterService { rpc ExecuteStrategyFromConfig(ExecuteStrategyFromConfigRequest) returns (ExecuteStrategyResponse) { option (google.api.http) = {post: "/v1/executestrategyfromconfig"}; } - rpc ListAllRuns(ListAllRunsRequest) returns (ListAllRunsResponse) { - option (google.api.http) = {get: "/v1/listallruns"}; + rpc ListAllTasks(ListAllTasksRequest) returns (ListAllTasksResponse) { + option (google.api.http) = {get: "/v1/listalltasks"}; } - rpc StartRun(StartRunRequest) returns (StartRunResponse) { - option (google.api.http) = {post: "/v1/startrun"}; + rpc StartTask(StartTaskRequest) returns (StartTaskResponse) { + option (google.api.http) = {post: "/v1/starttask"}; } - rpc StartAllRuns(StartAllRunsRequest) returns (StartAllRunsResponse) { - option (google.api.http) = {post: "/v1/startallruns"}; + rpc StartAllTasks(StartAllTasksRequest) returns (StartAllTasksResponse) { + option (google.api.http) = {post: "/v1/startalltasks"}; } - rpc StopRun(StopRunRequest) returns (StopRunResponse) { - option (google.api.http) = {post: "/v1/stoprun"}; + rpc StopTask(StopTaskRequest) returns (StopTaskResponse) { + option (google.api.http) = {post: "/v1/stoptask"}; } - rpc StopAllRuns(StopAllRunsRequest) returns (StopAllRunsResponse) { - option (google.api.http) = {post: "/v1/stopallruns"}; + rpc StopAllTasks(StopAllTasksRequest) returns (StopAllTasksResponse) { + option (google.api.http) = {post: "/v1/stopalltasks"}; } - rpc ClearRun(ClearRunRequest) returns (ClearRunResponse) { - option (google.api.http) = {delete: "/v1/clearrun"}; + rpc ClearTask(ClearTaskRequest) returns (ClearTaskResponse) { + option (google.api.http) = {delete: "/v1/cleartask"}; } - rpc ClearAllRuns(ClearAllRunsRequest) returns (ClearAllRunsResponse) { - option (google.api.http) = {delete: "/v1/clearallruns"}; + rpc ClearAllTasks(ClearAllTasksRequest) returns (ClearAllTasksResponse) { + option (google.api.http) = {delete: "/v1/clearalltasks"}; } } diff --git a/backtester/btrpc/btrpc.swagger.json b/backtester/btrpc/btrpc.swagger.json index 9ed108a5..1c593d05 100644 --- a/backtester/btrpc/btrpc.swagger.json +++ b/backtester/btrpc/btrpc.swagger.json @@ -294,6 +294,12 @@ "type": "string", "format": "int64" }, + { + "name": "config.dataSettings.liveData.useRealOrders", + "in": "query", + "required": false, + "type": "boolean" + }, { "name": "config.portfolioSettings.leverage.canUseLeverage", "in": "query", @@ -401,6 +407,27 @@ "in": "query", "required": false, "type": "boolean" + }, + { + "name": "startTimeOverride", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "endTimeOverride", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "intervalOverride", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" } ], "tags": [ @@ -430,7 +457,7 @@ ] } }, - "/v1/startall": { + "/v1/startalltasks": { "post": { "operationId": "BacktesterService_StartAllTasks", "responses": { @@ -617,6 +644,17 @@ } } }, + "btrpcCredentials": { + "type": "object", + "properties": { + "exchange": { + "type": "string" + }, + "keys": { + "$ref": "#/definitions/btrpcExchangeCredentials" + } + } + }, "btrpcCurrencySettings": { "type": "object", "properties": { @@ -769,17 +807,6 @@ } }, "btrpcExchangeCredentials": { - "type": "object", - "properties": { - "exchange": { - "type": "string" - }, - "keys": { - "$ref": "#/definitions/btrpcExchangeKeys" - } - } - }, - "btrpcExchangeKeys": { "type": "object", "properties": { "key": { @@ -905,10 +932,13 @@ "type": "string", "format": "int64" }, + "useRealOrders": { + "type": "boolean" + }, "credentials": { "type": "array", "items": { - "$ref": "#/definitions/btrpcExchangeCredentials" + "$ref": "#/definitions/btrpcCredentials" } } } diff --git a/backtester/engine/grpcserver.go b/backtester/engine/grpcserver.go index 0278946e..3427599b 100644 --- a/backtester/engine/grpcserver.go +++ b/backtester/engine/grpcserver.go @@ -210,6 +210,29 @@ func (s *GRPCServer) ExecuteStrategyFromFile(_ context.Context, request *btrpc.E return nil, err } + io64 := int64(request.IntervalOverride) + if io64 > 0 { + if io64 < gctkline.FifteenSecond.Duration().Nanoseconds() { + return nil, fmt.Errorf("%w, interval must be >= 15 seconds, received '%v'", gctkline.ErrInvalidInterval, time.Duration(request.IntervalOverride)) + } + cfg.DataSettings.Interval = gctkline.Interval(request.IntervalOverride) + } + sto := request.StartTimeOverride.AsTime() + if sto.Unix() != 0 && !sto.IsZero() { + if cfg.DataSettings.DatabaseData != nil { + cfg.DataSettings.DatabaseData.StartDate = request.StartTimeOverride.AsTime() + } else if cfg.DataSettings.APIData != nil { + cfg.DataSettings.APIData.StartDate = request.StartTimeOverride.AsTime() + } + } + eto := request.EndTimeOverride.AsTime() + if eto.Unix() != 0 && !eto.IsZero() { + if cfg.DataSettings.DatabaseData != nil { + cfg.DataSettings.DatabaseData.EndDate = request.EndTimeOverride.AsTime() + } else if cfg.DataSettings.APIData != nil { + cfg.DataSettings.APIData.EndDate = request.EndTimeOverride.AsTime() + } + } err = cfg.Validate() if err != nil { return nil, err diff --git a/backtester/engine/grpcserver_test.go b/backtester/engine/grpcserver_test.go index a9584d54..ae780627 100644 --- a/backtester/engine/grpcserver_test.go +++ b/backtester/engine/grpcserver_test.go @@ -16,10 +16,12 @@ import ( "github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/statistics" "github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/strategies/binancecashandcarry" gctcommon "github.com/thrasher-corp/gocryptotrader/common" + gctkline "github.com/thrasher-corp/gocryptotrader/exchanges/kline" "google.golang.org/protobuf/types/known/timestamppb" ) var dcaConfigPath = filepath.Join("..", "config", "strategyexamples", "dca-api-candles.strat") +var dbConfigPath = filepath.Join("..", "config", "strategyexamples", "dca-database-candles.strat") func TestExecuteStrategyFromFile(t *testing.T) { t.Parallel() @@ -57,6 +59,43 @@ func TestExecuteStrategyFromFile(t *testing.T) { t.Errorf("received '%v' expecting '%v'", err, nil) } + _, err = s.ExecuteStrategyFromFile(context.Background(), &btrpc.ExecuteStrategyFromFileRequest{ + StrategyFilePath: dcaConfigPath, + StartTimeOverride: timestamppb.New(time.Now()), + EndTimeOverride: timestamppb.New(time.Now().Add(-time.Minute)), + }) + if !errors.Is(err, gctcommon.ErrStartAfterEnd) { + t.Errorf("received '%v' expecting '%v'", err, gctcommon.ErrStartAfterEnd) + } + _, err = s.ExecuteStrategyFromFile(context.Background(), &btrpc.ExecuteStrategyFromFileRequest{ + StrategyFilePath: dbConfigPath, + StartTimeOverride: timestamppb.New(time.Now()), + EndTimeOverride: timestamppb.New(time.Now().Add(-time.Minute)), + }) + if !errors.Is(err, gctcommon.ErrStartAfterEnd) { + t.Errorf("received '%v' expecting '%v'", err, gctcommon.ErrStartAfterEnd) + } + + _, err = s.ExecuteStrategyFromFile(context.Background(), &btrpc.ExecuteStrategyFromFileRequest{ + StrategyFilePath: dcaConfigPath, + StartTimeOverride: timestamppb.New(time.Now().Add(-time.Minute)), + EndTimeOverride: timestamppb.New(time.Now()), + IntervalOverride: 1, + }) + if !errors.Is(err, gctkline.ErrInvalidInterval) { + t.Errorf("received '%v' expecting '%v'", err, gctkline.ErrInvalidInterval) + } + + _, err = s.ExecuteStrategyFromFile(context.Background(), &btrpc.ExecuteStrategyFromFileRequest{ + StrategyFilePath: dcaConfigPath, + StartTimeOverride: timestamppb.New(time.Now().Add(-time.Hour * 2)), + EndTimeOverride: timestamppb.New(time.Now()), + IntervalOverride: uint64(time.Hour.Nanoseconds()), + }) + if !errors.Is(err, nil) { + t.Errorf("received '%v' expecting '%v'", err, nil) + } + _, err = s.ExecuteStrategyFromFile(context.Background(), &btrpc.ExecuteStrategyFromFileRequest{ StrategyFilePath: dcaConfigPath, DoNotRunImmediately: true, @@ -188,11 +227,11 @@ func TestExecuteStrategyFromConfig(t *testing.T) { } } if defaultConfig.DataSettings.LiveData != nil { - creds := make([]*btrpc.ExchangeCredentials, len(defaultConfig.DataSettings.LiveData.ExchangeCredentials)) + creds := make([]*btrpc.Credentials, len(defaultConfig.DataSettings.LiveData.ExchangeCredentials)) for i := range defaultConfig.DataSettings.LiveData.ExchangeCredentials { - creds[i] = &btrpc.ExchangeCredentials{ + creds[i] = &btrpc.Credentials{ Exchange: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Exchange, - Keys: &btrpc.ExchangeKeys{ + Keys: &btrpc.ExchangeCredentials{ Key: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.Key, Secret: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.Secret, ClientId: defaultConfig.DataSettings.LiveData.ExchangeCredentials[i].Keys.ClientID, @@ -319,7 +358,21 @@ func TestExecuteStrategyFromConfig(t *testing.T) { Path: "test", InclusiveEndDate: false, } - cfg.DataSettings.LiveData = &btrpc.LiveData{} + cfg.DataSettings.LiveData = &btrpc.LiveData{ + Credentials: []*btrpc.Credentials{ + { + Exchange: "test", + Keys: &btrpc.ExchangeCredentials{ + Key: "1", + Secret: "2", + ClientId: "3", + PemKey: "4", + SubAccount: "5", + OneTimePassword: "6", + }, + }, + }, + } cfg.DataSettings.CsvData = &btrpc.CSVData{ Path: "test", } diff --git a/exchanges/binanceus/binanceus.go b/exchanges/binanceus/binanceus.go index b0d991de..61a57f49 100644 --- a/exchanges/binanceus/binanceus.go +++ b/exchanges/binanceus/binanceus.go @@ -913,8 +913,7 @@ func (bi *Binanceus) GetSubaccountTransferHistory(ctx context.Context, startTimeT := time.UnixMilli(int64(startTime)) endTimeT := time.UnixMilli(int64(endTime)) - hundredDayBefore := time.Now() - hundredDayBefore.Sub(time.UnixMilli(int64((time.Hour * 24 * 10) / time.Millisecond))) + hundredDayBefore := time.Now().Add(-time.Hour * 24 * 100).Truncate(time.Hour) if !(startTimeT.Before(hundredDayBefore)) || startTimeT.Before(time.Now()) { params.Set("startTime", strconv.Itoa(int(startTime))) }